diff --git a/pyca/config.py b/pyca/config.py index 539ebf1..fe5c591 100644 --- a/pyca/config.py +++ b/pyca/config.py @@ -170,6 +170,8 @@ def logger_init(): handlers.append(logging.StreamHandler(sys.stderr)) if logconf['file']: handlers.append(logging.handlers.WatchedFileHandler(logconf['file'])) + if logging.root.hasHandlers(): + logging.root.handlers.clear() for handler in handlers: handler.setFormatter(logging.Formatter(logconf['format'])) logging.root.addHandler(handler)