MCPcopy Create free account
hub / github.com/MLSysU/TD-Pipe / _setup_logger

Function _setup_logger

TD_Pipe/logger.py:29–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28
29def _setup_logger():
30 _root_logger.setLevel(logging.DEBUG)
31 global _default_handler
32 if _default_handler is None:
33 _default_handler = logging.StreamHandler(sys.stdout)
34 _default_handler.flush = sys.stdout.flush # type: ignore
35 _default_handler.setLevel(logging.INFO)
36 _root_logger.addHandler(_default_handler)
37 fmt = NewLineFormatter(_FORMAT, datefmt=_DATE_FORMAT)
38 _default_handler.setFormatter(fmt)
39 # Setting this will avoid the message
40 # being propagated to the parent logger.
41 _root_logger.propagate = False
42
43
44# The logger is initialized when the module is imported.

Callers 1

logger.pyFile · 0.85

Calls 1

NewLineFormatterClass · 0.85

Tested by

no test coverage detected