Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options map between logger log level and transport log level #14

Closed
wants to merge 1 commit into from

Conversation

VeryCrazyDog
Copy link

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 calling console.info, the message output will include the word INFO. Unfortunately console-log-level mapped require('console-log-level').debug to console.info, as a result all debug message are printed with INFO 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 level fatal which is not supported in console.

@VeryCrazyDog
Copy link
Author

Closing the PR has this haven't been merged for a long time. Maybe we should just keep the logger as simple as it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant