--- /usr/lib/python2.5/logging/config.py 2008-06-18 21:41:39.667451694 -0300 +++ config.py 2008-06-18 21:46:08.593450588 -0300 @@ -52,7 +52,7 @@ # _listener holds the server object doing the listening _listener = None -def fileConfig(fname, defaults=None): +def fileConfig(fname, defaults=None, disable_existing_loggers=True): """ Read the logging configuration from a ConfigParser-format file. @@ -82,7 +82,7 @@ del logging._handlerList[:] # Handlers add themselves to logging._handlers handlers = _install_handlers(cp, formatters) - _install_loggers(cp, handlers) + _install_loggers(cp, handlers, disable_existing_loggers) finally: logging._releaseLock() @@ -170,7 +170,7 @@ return handlers -def _install_loggers(cp, handlers): +def _install_loggers(cp, handlers, disable_existing_loggers): """Create and install loggers""" # configure the root first @@ -231,8 +231,9 @@ #Disable any old loggers. There's no point deleting #them as other threads may continue to hold references #and by disabling them, you stop them doing any logging. - for log in existing: - root.manager.loggerDict[log].disabled = 1 + if disable_existing_loggers: + for log in existing: + root.manager.loggerDict[log].disabled = 1 def listen(port=DEFAULT_LOGGING_CONFIG_PORT):