summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-10-19 13:20:18 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-10-19 13:20:18 +0100
commit7f981d42521913a3f7a715cd043cbf7fba5009b0 (patch)
tree9166500a322c3cb887eea05980e4ffb0f8295a7b
parent11b08b988b983043f0c058014831228d4a4db985 (diff)
downloadpykolab-7f981d42521913a3f7a715cd043cbf7fba5009b0.tar.gz
Prepare logger for multi-threading, by including the process PID in the debug messages.
-rw-r--r--pykolab/logger.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pykolab/logger.py b/pykolab/logger.py
index 6351d21..55dd9bd 100644
--- a/pykolab/logger.py
+++ b/pykolab/logger.py
@@ -20,6 +20,7 @@
import inspect
import logging
import logging.handlers
+import os
import sys
import time
@@ -93,6 +94,6 @@ class Logger(logging.Logger):
if level <= self.debuglevel:
# TODO: Not the way it's supposed to work!
- self.log(logging.DEBUG, msg)
+ self.log(logging.DEBUG, '[%d]: %s' %(os.getpid(),msg))
logging.setLoggerClass(Logger)