Commit 4c22a803 authored by Chris McDonough's avatar Chris McDonough

Don't try to optimize by checking for disabled and effective levels within the...

Don't try to optimize by checking for disabled and effective levels within the log method.  The logger's level may not be meaningful if this logger is configured with handlers that accept messages at a lower level than that of the logger itself.
parent 503b5cb2
......@@ -44,12 +44,6 @@ class EventLogger(BaseLogger):
level = (zlog_to_pep282_severity_cache_get(severity) or
zlog_to_pep282_severity(severity))
# Try an early exit if the logger is disabled for this level.
# (XXX This inlines logger.isEnabledFor(level).)
if (self.logger.manager.disable >= level or
level < self.logger.getEffectiveLevel()):
return
msg = "%s %s %s" % (
severity_string_cache_get(severity) or severity_string(severity),
subsystem,
......
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