Skip to content Skip to sidebar Skip to footer

Logging Issues With Python Logging Module

I am using python logging module. I am initialising file having following data def initialize_logger(output_dir): ''' This initialise the logger :param output_dir:

Solution 1:

You have two handlers. Clear the handlers before you add a new one:

root.handlers = [] # clears the list
root.addHandler(ch) # adds a new handler

Post a Comment for "Logging Issues With Python Logging Module"