Commit 75f0b5db authored by Vinay Sajip's avatar Vinay Sajip Committed by GitHub

Updated LoggerAdapter.isEnabledFor to take advantage of caching. (GH-2951)

parent 9397e2a8
......@@ -1729,9 +1729,7 @@ class LoggerAdapter(object):
"""
Is this logger enabled for level 'level'?
"""
if self.logger.manager.disable >= level:
return False
return level >= self.getEffectiveLevel()
return self.logger.isEnabledFor(level)
def setLevel(self, level):
"""
......
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