aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-06-28 17:10:18 +0200
committerLoïc Hoguin <[email protected]>2018-06-28 17:10:18 +0200
commita76c32db5e32ab6a6b35ce6625cb3aedcac067b6 (patch)
tree745b39ea422a946108cb406d1fbcd3ece678ec39 /examples
parent16143354361651cc7c14b81595760118efce8870 (diff)
downloadcowboy-a76c32db5e32ab6a6b35ce6625cb3aedcac067b6.tar.gz
cowboy-a76c32db5e32ab6a6b35ce6625cb3aedcac067b6.tar.bz2
cowboy-a76c32db5e32ab6a6b35ce6625cb3aedcac067b6.zip
Introduce undocumented option logger
This commit reworks the logging that Cowboy does via error_logger to make the module that will do the actual logging configurable. The logger module interface must be the same as logger and lager: a separate function per log level with the same log levels they support. The default behavior remains to call error_logger, although some messages were downgraded to warnings instead of errors. Since error_logger only supports three different log levels, some messages may get downgraded/upgraded depending on what the original log level was to make them compatible with error_logger. The {log, Level, Format, Args} command was also added to stream handlers. Stream handlers should use this command to log messages because it allows writing a stream handler to intercept some of those messages and extract information or block them as necessary. The logger option only applies to Cowboy itself, not to the messages Ranch logs, so more work remains to be done in that area.
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions