You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now if you set LOG_LEVEL=debug you will only see debug statements.
Changes are, if you are debugging, you are also interested in errors, even warning, maybe info ? You get the gist.
I expected that setting the log level to info would also display all messages "above" info. Changing the current behaviour would be a breaking change, so what about expressions ?
# Ideas of syntaxes
LOG_LEVEL=info+ node ./app.js # info and anything above
LOG_LEVEL=debug:warning node ./app.js # anything between debug and warning, both included# More verbose syntaxes but don't rely on a hierarchy
LOG_LEVEL="debug|info|warning|error" node ./app.js .# The pipe is a bash operator so we have to use quotes. But the pipe is a common operation for "or".
LOG_LEVEL=debug,info,warning,error node ./app.js # Doesn't need quotes, maybe less readable ?
If we allow to set multiple levels, we can actually allow any character that is not a letter as a separator.
I'm willing to submit a PR for this.
The text was updated successfully, but these errors were encountered:
Right now if you set
LOG_LEVEL=debug
you will only see debug statements.Changes are, if you are debugging, you are also interested in errors, even warning, maybe info ? You get the gist.
I expected that setting the log level to
info
would also display all messages "above" info. Changing the current behaviour would be a breaking change, so what about expressions ?If we allow to set multiple levels, we can actually allow any character that is not a letter as a separator.
I'm willing to submit a PR for this.
The text was updated successfully, but these errors were encountered: