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

This commit is contained in:
Vinay Sajip 2017-07-30 20:15:18 +01:00 committed by GitHub
parent 9397e2a87e
commit 75f0b5dbac
1 changed files with 1 additions and 3 deletions

View File

@ -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):
"""