Skip to content

Commit 4dbba52

Browse files
committed
logging: Fix missing logging
Previously we started using logging before it had been initialized. Which resulted in leapp stopping to log for some logger names the debug output. We did not know why this happened. It turns out that fileConfig from the logging library has a parameter disable_existing_loggers which is by default set to True and will set all loggers that have existed before the call to fileConfig to disabled. Which in turn will make them stop logging of course. This patch will change this behaviour and set disable_existing_loggers to False in order to have existing loggers be still enabled. Signed-off-by: Vinzenz Feenstra <vfeenstr@redhat.com>
1 parent d3d81b1 commit 4dbba52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

leapp/logger/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def configure_logger(log_file=None):
5959
path = os.getenv('LEAPP_LOGGER_CONFIG', '/etc/leapp/logger.conf')
6060

6161
if path and os.path.isfile(path):
62-
logging.config.fileConfig(path)
62+
logging.config.fileConfig(path, disable_existing_loggers=False)
6363
else: # Fall back logging configuration
6464
logging.Formatter.converter = time.gmtime
6565
logging.basicConfig(

0 commit comments

Comments
 (0)