Commit 3ea83389 authored by Guido van Rossum's avatar Guido van Rossum

Add the NullHandler back, and a comment explaining why it's needed.

parent 33b99436
...@@ -27,7 +27,10 @@ from logging import StreamHandler, Formatter ...@@ -27,7 +27,10 @@ from logging import StreamHandler, Formatter
class EventLogger(BaseLogger): class EventLogger(BaseLogger):
# Get our logger object:
logger = logging.getLogger('event') logger = logging.getLogger('event')
# Add a null handler to prevent warnings about loggers with no handlers:
logger.addHandler(NullHandler())
def log(self, subsystem, severity, summary, detail, error): def log(self, subsystem, severity, summary, detail, error):
......
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