Add options map between logger log level and transport log level #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Another issue I encountered when was using the library console-log-level to develop AWS Lambda function with log to CloudWatch is that,
console
was monkey-patched by AWS such that when callingconsole.info
, the message output will include the wordINFO
. Unfortunatelyconsole-log-level
mappedrequire('console-log-level').debug
toconsole.info
, as a result all debug message are printed withINFO
in CloudWatch.To allow greater control by the user, it would be good to add a mapping to map between console-log-level log level and transport (in this case,
console
) log level. User can also disable a log level in console-log-level by supplying a falsy value to avoid unintentionally called log levelfatal
which is not supported inconsole
.