From 09c59c47042b61e96519e22d451d36d86b37a518 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 25 Feb 2018 10:37:33 +0200 Subject: [PATCH] logging: Add setLevel() method. --- logging/logging.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/logging/logging.py b/logging/logging.py index 8bb17298..0e1b7f04 100644 --- a/logging/logging.py +++ b/logging/logging.py @@ -30,6 +30,9 @@ class Logger: return l return "LVL%s" % level + def setLevel(self, level): + self.level = level + def isEnabledFor(self, level): return level >= (self.level or _level)