Using logging config file suppresses __init__.py logging statements.
__init__.py
provides useful logging statement during database update. However, these are suppressed when using a logging config file. This happens because the logger
instance in __init__.py
is created before the logging config file is applied in commandline.py
, and the default behavior of logging.config.fileConfig
is to disable existing loggers.
This can be corrected by passing disable_existing_loggers=False
to logging.config.fileConfig
.[1]
https://docs.python.org/3/library/logging.config.html#logging.config.fileConfig