Description
Context
Its been tested that if we set:
- logger demo level debug
- logger demo.levels level warning
and run demo.levels.warning("hello, world"), it will only print the warning from the demo.levels logger. This means we have a path into setting different log levels for each child and parent.
Desired change
get_daq_logger at the moment initialises new loggers with the log level INFO by default, if nothing was set. This means every instance of child loggers need to define what log level they want to have. It would be nice if we can have it so that the default action is for the child loggers to inheret the log level of the parent.
Potential impact radius
Small/Isolated
Reason for change
No response
Suggested implementations
Might be straightforward to do this. Can leverage log_level.NOTSET and write some logic in get_daq_logger and elsewhere to check for this and not set any predefined levels
Testing suggestions
Can be checked in pytest, in the test that checks the loggers. See if inheritance works
Anything else?
TODO for @emmuhamm:
Description
Context
Its been tested that if we set:
and run demo.levels.warning("hello, world"), it will only print the warning from the demo.levels logger. This means we have a path into setting different log levels for each child and parent.
Desired change
get_daq_loggerat the moment initialises new loggers with the log level INFO by default, if nothing was set. This means every instance of child loggers need to define what log level they want to have. It would be nice if we can have it so that the default action is for the child loggers to inheret the log level of the parent.Potential impact radius
Small/Isolated
Reason for change
No response
Suggested implementations
Might be straightforward to do this. Can leverage log_level.NOTSET and write some logic in
get_daq_loggerand elsewhere to check for this and not set any predefined levelsTesting suggestions
Can be checked in pytest, in the test that checks the loggers. See if inheritance works
Anything else?
TODO for @emmuhamm: