summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing
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/multiprocessing
parente1cdfd78d823c50a592a7cf67e14f0786c65ead9 (diff)
downloadcpython-9a0fc97bf4a336d81160b19a52ab4f5d2e2317e0.zip
cpython-9a0fc97bf4a336d81160b19a52ab4f5d2e2317e0.tar.gz
cpython-9a0fc97bf4a336d81160b19a52ab4f5d2e2317e0.tar.bz2
merge cl r68737 to py3k
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r--Lib/multiprocessing/util.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/Lib/multiprocessing/util.py b/Lib/multiprocessing/util.py
index 3fe0175..ac9d79e 100644
--- a/Lib/multiprocessing/util.py
+++ b/Lib/multiprocessing/util.py
@@ -69,34 +69,10 @@ def get_logger():
atexit._exithandlers.remove((_exit_function, (), {}))
atexit._exithandlers.append((_exit_function, (), {}))
- _check_logger_class()
_logger = logging.getLogger(LOGGER_NAME)
return _logger
-def _check_logger_class():
- '''
- Make sure process name is recorded when loggers are used
- '''
- # XXX This function is unnecessary once logging is patched
- import logging
- if hasattr(logging, 'multiprocessing'):
- return
-
- logging._acquireLock()
- try:
- OldLoggerClass = logging.getLoggerClass()
- if not getattr(OldLoggerClass, '_process_aware', False):
- class ProcessAwareLogger(OldLoggerClass):
- _process_aware = True
- def makeRecord(self, *args, **kwds):
- record = OldLoggerClass.makeRecord(self, *args, **kwds)
- record.processName = current_process()._name
- return record
- logging.setLoggerClass(ProcessAwareLogger)
- finally:
- logging._releaseLock()
-
def log_to_stderr(level=None):
'''
Turn on logging and add a handler which prints to stderr