-
Notifications
You must be signed in to change notification settings - Fork 3
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: configure root logger #146
Conversation
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.
Oof, thank you for catching that. Looks like we need to configure the root logger first so that the |
After switching the order, I don't see duplicate logging anymore:
|
Co-authored-by: Kegan Maher <[email protected]>
Related to #139
This PR makes sure that in addition to configuring Flask's logger (which Flask uses internally), we also configure the root logger. This is so that loggers we create from the standard logging module are configured correctly.
Our code doesn't need to use
app.logger
because I believe there is nothing to be gained from using it over just a normallogger
, and I think we'd rather use not have to importcurrent_app
everywhere that needs logging. We still configure it though for internal Flask logging messages.Steps to Reproduce
/verify
endpoint, e.g. in a browser/healthcheck
and/publickey
as wellExpected behavior
Since the log level in default settings is
INFO
, you should see at least that level.Something like:
Actual behavior
Not seeing any
INFO
logs, and also not seeing formatted log messages. It is as if thelogger
is not configured.