-
Notifications
You must be signed in to change notification settings - Fork 7
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
logger: do not log stack w/ info(), debug() and spam() #5
Conversation
This works. I like the addition of tests. 👍 |
Great! |
I'm unclear on the motivation - |
I'm not aware of where |
Right, exactly: |
I think the idea is that only |
Hm. One of the reasons this change is important is because of bcoin-org/bcoin#762, I assume that user's log was set to the default |
No, the stack would be displayed. I think you have the logger level setting confused with the logger level function. In this PR, |
info()
, debug()
and spam()
info()
, debug()
and spam()
info()
, debug()
and spam()
info()
, debug()
and spam()
This reverts previous behavior to not include the stack for info(), debug() and spam() level logs and will continue to include the stack in all cases for error() and warning() logs as was previously resolved.
Warnings are used for logical warnings, where we know what happened and we are just announcing it (that's how I have seen it used at least). I am not sure if that needs stack traces. errors definitely need stack traces. |
The use of |
I see that would definitely obscure the source. Would be nice to expand on those log messages as well, so you can get more context but that's part of the error messages not this PR. So we have two usage, as errors that are not essential but could be important and user warnings that are just informational and not an error. |
This reverts previous behavior to not include the stack for info(), debug() and spam() level logs and will continue to include the stack in all cases for error() and warning() logs as was previously resolved.
cc: @BluSyn