Skip to content
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

settings.logging.file_level is not honored #223

Closed
ogajduse opened this issue Jul 12, 2023 · 2 comments · Fixed by #289
Closed

settings.logging.file_level is not honored #223

ogajduse opened this issue Jul 12, 2023 · 2 comments · Fixed by #289
Labels
bug Something isn't working

Comments

@ogajduse
Copy link
Member

Having the following in broker_settings.yaml, nothing above the INFO level appears in broker.log.

logging:
  console_level: info
  file_level: trace

Thanks @lpramuk for discovering it!

@ogajduse ogajduse added the bug Something isn't working label Jul 12, 2023
@tpapaioa
Copy link
Collaborator

This issue occurs when using the broker CLI. The --log-level option uses the callback method helpers.update_log_level to update the logger with any user-specified level, passing in a default value of settings.settings.logging.console_level:

https://github.com/SatelliteQE/broker/blob/master/broker/commands.py#L135

helpers.update_log_level calls both set_log_level and set_file_logging with the value that was passed in:

https://github.com/SatelliteQE/broker/blob/master/broker/helpers.py#L373

helpers.update_log_level is also called by helpers.fork_broker, to set both console and file log levels to "silent" when creating a forked background process:

https://github.com/SatelliteQE/broker/blob/master/broker/helpers.py#L390

tpapaioa added a commit to tpapaioa/broker that referenced this issue Apr 17, 2024
tpapaioa added a commit to tpapaioa/broker that referenced this issue Apr 17, 2024
@ogajduse ogajduse linked a pull request Apr 17, 2024 that will close this issue
tpapaioa added a commit to tpapaioa/broker that referenced this issue Apr 18, 2024
JacobCallahan pushed a commit that referenced this issue Apr 19, 2024
* Fix file logging level issue.

Fixes #223

* Patch awx logging to allow trace logging in all cases.
@ogajduse
Copy link
Member Author

Fixed in #289

JacobCallahan pushed a commit that referenced this issue May 29, 2024
* Fix file logging level issue.

Fixes #223

* Patch awx logging to allow trace logging in all cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants