-
Notifications
You must be signed in to change notification settings - Fork 51
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
refact(log): Use a replaceable logger #331
Conversation
787591f
to
d6d253a
Compare
Codecov Report
@@ Coverage Diff @@
## master #331 +/- ##
=======================================
Coverage 36.74% 36.74%
=======================================
Files 47 47
Lines 3132 3132
=======================================
Hits 1151 1151
Misses 1761 1761
Partials 220 220
Continue to review full report at Codecov.
|
pkg/log/logger.go
Outdated
} | ||
|
||
// Fatalf logs a fatal message and immediately executes the application | ||
// with os.Exit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically in the case of the default logger, this relies on log.Fatalf exiting right? so it theoretically is possible for you to swap a new logger in that doesn't exit. Probably just clarify it in the comments, I doubt this will be an issue anyone will actually face.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Previously it was impossible to mute fiano without affecting the global logger "log". Now it is possible. Signed-off-by: Dmitrii Okunev <[email protected]>
d6d253a
to
86d0011
Compare
Previously it was impossible to mute fiano without affecting the global logger "log". Now it is possible. Signed-off-by: Dmitrii Okunev <[email protected]>
Previously it was impossible to mute fiano without affecting the global logger "log". Now it is possible.
ITS: #330
Test Plan
unit-tests
end2end
before
after