summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorJesse Noller <jnoller@gmail.com>2009-01-18 21:12:58 (GMT)
committerJesse Noller <jnoller@gmail.com>2009-01-18 21:12:58 (GMT)
commit9a0fc97bf4a336d81160b19a52ab4f5d2e2317e0 (patch)
treea2862fe4572fa0fb65817b5be5d29dd1768ef0bc /Lib/logging
parente1cdfd78d823c50a592a7cf67e14f0786c65ead9 (diff)
downloadcpython-9a0fc97bf4a336d81160b19a52ab4f5d2e2317e0.zip
cpython-9a0fc97bf4a336d81160b19a52ab4f5d2e2317e0.tar.gz
cpython-9a0fc97bf4a336d81160b19a52ab4f5d2e2317e0.tar.bz2
merge cl r68737 to py3k
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index cce6ea0..ee43554 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -99,6 +99,11 @@ raiseExceptions = 1
logThreads = 1
#
+# If you don't want multiprocessing information in the log, set this to zero
+#
+logMultiprocessing = 1
+
+#
# If you don't want process information in the log, set this to zero
#
logProcesses = 1
@@ -263,6 +268,11 @@ class LogRecord:
else:
self.thread = None
self.threadName = None
+ if logMultiprocessing:
+ from multiprocessing import current_process
+ self.processName = current_process().name
+ else:
+ self.processName = None
if logProcesses and hasattr(os, 'getpid'):
self.process = os.getpid()
else: