-
Notifications
You must be signed in to change notification settings - Fork 42
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 file logging level issue #289
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.
LGTM. Thanks for the fix, Tasos.
What do you think of taking this a little bit of a different direction? |
726bc3d
to
93b846d
Compare
Updated to set file level to match console level if the console level is lower. |
Added one more fix related to trace-level logging. |
Neat! But now the docstring of def patch_awx_for_verbosity(api):
"""Patch the awxkit API to log when we're at trace level.""" Can you please update it? |
a069b4c
to
1cee6a4
Compare
Updated the docstring to hopefully be more accurate. |
1cee6a4
to
2ce85ee
Compare
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.
ACK, thanks for the changes!
* Fix file logging level issue. Fixes #223 * Patch awx logging to allow trace logging in all cases.
Fixes #223
~/.broker/broker_settings.yaml
:The CLI logs only
info
-level messages to the console, but logstrace
-level messages tobroker.log
:Example behavior:
info
and file level set todebug
:The file level is lower than the console level, and this works as expected now, fixing issue #223
debug
and file level set toinfo
:In this case, the file level is automatically adjusted to match the console level, which is lower. Info and debug messages are logged to both.
setup_logzero()
, so that it callspatch_awx_for_verbosity()
to patch the ansible api client and allow trace-level logging, no matter what the passed in value forlevel
is. Before this fix, trace-level logging from the ansible client wasn't happening in the following cases: