-
-
Notifications
You must be signed in to change notification settings - Fork 740
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: The default log levels for different NODE_ENVs are surprising #704
Labels
Comments
ivarconr
changed the title
The default log levels for different NODE_ENVs are surprising
fix: The default log levels for different NODE_ENVs are surprising
Feb 5, 2021
As a side note, we set NODE_ENV to "production" in the official Docker image, which kills all logging you might expect to see from the app when reading the docs Unleash/unleash-docker#36 (comment) (Maybe it's better to |
ivarconr
added a commit
that referenced
this issue
Apr 23, 2021
ivarconr
added a commit
that referenced
this issue
Apr 23, 2021
ivarconr
added a commit
that referenced
this issue
Apr 23, 2021
Tymek
pushed a commit
that referenced
this issue
Aug 26, 2022
refactor: use copy library and add explicit export
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I set the environment variable
NODE_ENV
toproduction
in my Docker image to avoid installing dev dependencies and having libraries likeenvalid
work as intended.As a side effect of this setting, Unleash sets log4js's log level to ERROR:
unleash/lib/logger.js
Lines 5 to 13 in 3a983d2
I find this behaviour quite surprising. I'm pretty much always interested in INFO and up even in a production environment.
I also find it strange that
test
environments only log FATAL messages, even though the log provider validation doesn't check for an implementation of fatal logging:unleash/lib/logger.js
Lines 37 to 45 in 3a983d2
Am I missing a way to override the log level in a production environment without providing my own logger implementation? If not, exposing a config option and/or an env var (for example,
LOG_LEVEL
) would be great!The text was updated successfully, but these errors were encountered: