summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-09-26 10:58:26 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-09-26 10:58:26 (GMT)
commit12e585451d2089fb688f299342a8a4e6e5c614f6 (patch)
treee222b2d10b7429468d8049e5036fdee4b031ef25
parent1888524f0e8db15921d84d7bea6315af36825ae3 (diff)
downloadpykolab-12e585451d2089fb688f299342a8a4e6e5c614f6.tar.gz
Some other utilities like debug output, but do not take into account multiple levels of debugging.
-rw-r--r--pykolab/logger.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pykolab/logger.py b/pykolab/logger.py
index 8f2e5f7..6351d21 100644
--- a/pykolab/logger.py
+++ b/pykolab/logger.py
@@ -87,6 +87,10 @@ class Logger(logging.Logger):
def debug(self, msg, level=1):
self.setLevel(self.loglevel)
+ # Work around other applications not using various levels of debugging
+ if not self.name.startswith('pykolab') and not self.debuglevel == 9:
+ return
+
if level <= self.debuglevel:
# TODO: Not the way it's supposed to work!
self.log(logging.DEBUG, msg)