mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
merge cl r68737 to py3k
This commit is contained in:
parent
e1cdfd78d8
commit
9a0fc97bf4
3 changed files with 13 additions and 24 deletions
|
@ -98,6 +98,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
|
||||
#
|
||||
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue