From 12e585451d2089fb688f299342a8a4e6e5c614f6 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" Date: Mon, 26 Sep 2011 11:58:26 +0100 Subject: Some other utilities like debug output, but do not take into account multiple levels of debugging. --- pykolab/logger.py | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit v1.1