Files
2026-07-02 23:04:54 -05:00

1.3 KiB

Python Logging Source References

Use these official Python docs when applying the Python logging skill.

Core Documentation

!!! info "Core documentation" - Logging HOWTO - Logging Cookbook - logging API reference - logging.config reference

Configuration And dictConfig

!!! info "dictConfig references" - Dictionary schema details for version, formatters, handlers, loggers, and root. - logging.config.dictConfig function reference.

Practical Notes

  • Prefer module loggers created with logging.getLogger(__name__).
  • Let applications configure handlers and formatters; libraries should emit logs without taking over routing.
  • Use basicConfig for simple scripts and dictConfig for centralized application configuration.
  • Explicitly set disable_existing_loggers: False in dictConfig unless disabling existing non-root loggers is intentional.
  • Use queue-based handlers when slow handlers would block async, threaded, or high-volume code paths.