settings.logging.file_level is not honored
ogajduse opened this issue · comments
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!
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
Fixed in #289