MCPcopy Create free account
hub / github.com/LabPy/lantz / get_logger

Function get_logger

lantz/log.py:60–70  ·  view source on GitHub ↗

Return a logger with the specified name, creating if necessary. if patch_makeRecord, the logger makeRecord will be replaced with a PEP3101 compatible version.

(name, add_NullHandler=True, patch_makeRecord=True)

Source from the content-addressed store, hash-verified

58
59
60def get_logger(name, add_NullHandler=True, patch_makeRecord=True):
61 """Return a logger with the specified name, creating if necessary.
62
63 if patch_makeRecord, the logger makeRecord will be replaced with a PEP3101 compatible version.
64 """
65 logger = logging.getLogger(name)
66 if add_NullHandler:
67 logger.addHandler(logging.NullHandler())
68 if patch_makeRecord:
69 logger.makeRecord = _makeRecord
70 return logger
71
72LOGGER = get_logger('lantz')
73

Callers 10

test_loggerMethod · 0.90
SpamClass · 0.90
Spam2Class · 0.90
test_loggerMethod · 0.90
SpamClass · 0.90
log.pyFile · 0.85
driver.pyFile · 0.85
qtlog.pyFile · 0.85
widgets.pyFile · 0.85
app.pyFile · 0.85

Calls

no outgoing calls

Tested by 2

test_loggerMethod · 0.72
test_loggerMethod · 0.72