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

fix(logger.log): warn on invalid log-level #1062

Conversation

abernh
Copy link
Contributor

@abernh abernh commented Feb 23, 2021

a warning is logged if the log method is used with an unknown log-level
this happens whenever people confuse the log method with yet another log-level-short method (like in the browser console.log)
adjusted newLevel-test accordingly

rel: #1042

Signed-off-by: abernh a.bernhard@23go.de

a warning is logged if the `log` method is used with an unknown log-level
this happens whenever people confuse the `log` method with yet another log-level-short method (like in the browser console.log)
adjusted `newLevel-test` accordingly

rel: log4js-node#1042

Signed-off-by: abernh <a.bernhard@23go.de>
@abernh
Copy link
Contributor Author

@abernh abernh commented Feb 23, 2021

One out of the 8 travis-ci builds failed, but unrelated to my PR.

not ok 16 - test/tap/fileAppender-test.js # time=3026.134ms

Copy link
Contributor

@lamweili lamweili left a comment

This is a good addition to WARN developers that the specified level does not exist or is invalid before falling back to INFO.
Looks good and passes the tests.

@lamweili lamweili added this to the 6.4.0 milestone Jan 5, 2022
@lamweili lamweili linked an issue Jan 7, 2022 that may be closed by this pull request
@lamweili lamweili merged commit 968fc1c into log4js-node:master Jan 7, 2022
1 check failed
@lamweili lamweili added the enhancement label Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants