Commit cd5c5403 authored by Guido van Rossum's avatar Guido van Rossum

Rename the EventLogger instance to event_logger -- I don't like the

confusion caused by having the instance and the class have the same
name.
parent 9f5148e7
......@@ -60,9 +60,9 @@ class EventLogger(BaseLogger):
severity = zlog_to_pep282_severity(severity)
self.logger.log(severity, msg, **kw)
EventLogger = EventLogger()
event_logger = EventLogger()
log_write = EventLogger.log
log_write = event_logger.log
def severity_string(severity, mapping={
-300: 'TRACE',
......@@ -155,7 +155,7 @@ formatters = {
def initialize_from_environment():
""" Reinitialize the event logger from the environment """
# clear the current handlers from the event logger
EventLogger.logger.handlers = []
event_logger.logger.handlers = []
handlers = []
......@@ -184,8 +184,7 @@ def initialize_from_environment():
severity = get_env_severity_info()
severity = zlog_to_pep282_severity(severity)
EventLogger.logger.setLevel(severity)
event_logger.logger.setLevel(severity)
for handler in handlers:
EventLogger.logger.addHandler(handler)
event_logger.logger.addHandler(handler)
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