Commit 294ab236 authored by Fred Drake's avatar Fred Drake

try to be a bit more careful in setting up the event logger; some things should

be done as late as possible (if ever)
parent ed1a090b
......@@ -35,9 +35,10 @@ class EventLogger(BaseLogger):
# Get our logger object:
logger = logging.getLogger('event')
# Add a null handler to prevent warnings about loggers with no handlers:
if not logger.handlers:
# Add a null handler to prevent warnings about loggers with no
# handlers:
logger.addHandler(loghandler.NullHandler())
logger.propagate = 0
def log(self, subsystem, severity, summary, detail, error):
......@@ -200,3 +201,5 @@ def initialize_from_environment():
for handler in handlers:
event_logger.logger.addHandler(handler)
event_logger.logger.propagate = 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment