MCPcopy Index your code
hub / github.com/python/cpython / get_logger

Function get_logger

Lib/multiprocessing/util.py:65–86  ·  view source on GitHub ↗

Returns logger used by multiprocessing

()

Source from the content-addressed store, hash-verified

63 _logger.log(SUBWARNING, msg, *args, stacklevel=2)
64
65def get_logger():
66 '''
67 Returns logger used by multiprocessing
68 '''
69 global _logger
70 import logging
71
72 with logging._lock:
73 if not _logger:
74
75 _logger = logging.getLogger(LOGGER_NAME)
76 _logger.propagate = 0
77
78 # XXX multiprocessing should cleanup before logging
79 if hasattr(atexit, 'unregister'):
80 atexit.unregister(_exit_function)
81 atexit.register(_exit_function)
82 else:
83 atexit._exithandlers.remove((_exit_function, (), {}))
84 atexit._exithandlers.append((_exit_function, (), {}))
85
86 return _logger
87
88def log_to_stderr(level=None):
89 '''

Callers 2

get_loggerMethod · 0.85
log_to_stderrFunction · 0.85

Calls 5

getLoggerMethod · 0.80
unregisterMethod · 0.45
registerMethod · 0.45
removeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…