MCPcopy Create free account
hub / github.com/ipython/traitlets / _log_default

Method _log_default

traitlets/config/application.py:298–309  ·  view source on GitHub ↗

Start logging for this application.

(self)

Source from the content-addressed store, hash-verified

296
297 @default("log")
298 def _log_default(self) -> AnyLogger:
299 """Start logging for this application."""
300 log = logging.getLogger(self.__class__.__name__)
301 log.propagate = False
302 _log = log # copied from Logger.hasHandlers() (new in Python 3.2)
303 while _log is not None:
304 if _log.handlers:
305 return log
306 if not _log.propagate:
307 break
308 _log = _log.parent # type:ignore[assignment]
309 return log
310
311 logging_config = Dict(
312 help="""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected