Start logging for this application.
(self)
| 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=""" |
nothing calls this directly
no outgoing calls
no test coverage detected