logging-tree
Introspect and display the logger tree inside "logging"
What it is and what it does
logging_tree is a diagnostic tool that introspects Python's standard logging module and displays the current logger tree in a human-readable ASCII diagram. It shows the root logger and all child loggers, their configured levels, handlers, filters, and propagation settings. The package solves the problem of understanding complex logging configurations at runtime—especially useful when debugging why certain log messages appear or disappear, or when inheriting code with unfamiliar logging setups.
The package has no runtime dependencies and works by querying the logging module's internal state. It offers both a simple `printout()` function for immediate console output and lower-level APIs (`format.build_description()`, `format.describe()`, `tree()`) for programmatic access to the tree structure. It handles edge cases like placeholder nodes (parent loggers created implicitly) and loggers with disabled propagation.
Use it for:
- Debug why a log message is or isn't appearing by visualizing the full logger hierarchy and propagation chain.
- Audit logging configuration in a running application to verify handlers and levels are set as expected.
- Understand inherited or third-party code's logging setup without reading source files.
- Verify that custom logger hierarchies (e.g., 'app.module.submodule') are structured correctly.
- Troubleshoot double-logging or missing log output caused by handler duplication or propagation settings.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Visualizes the hierarchy of loggers, handlers, and filters in Python's standard logging module, showing how messages propagate through the logger tree.
Yes. This is a low-friction, zero-dependency diagnostic tool for a common pain point (understanding logging configuration). It is stable, permissive-licensed, and works across a wide range of Python versions. Install it if you regularly debug logging setups or inherit complex applications; skip it if you never need to inspect logging state at runtime.
Install
logging-tree on PyPI
pip
pip install logging-treeuv
uv add logging-treepoetry
poetry add logging-treeInstalling logging-tree
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance is dormant (833 days since last release) but the package is marked Mature and the repository remains active with 333 stars; suitable for stable introspection use.
License in practice
Permissive license (BSD) with no restrictions on commercial or private use.
Quickstart
pip install logging-tree
import logging
from logging_tree import printout
logging.getLogger('app').setLevel(logging.DEBUG)
printout()
Verify before relying
- Whether the package works correctly with Python versions newer than 3.12 (latest declared compatibility is 3.12).
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 833 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 235,180/month — #9,006 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: logging_tree-1.10-py2.py3-none-any.whl
Tags
More Logging packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
python-json-loggerFormats Python logging output as JSON, making…
permissive · top 1,000 on PyPI
structlogstructlog is a structured logging library that…
permissive · top 1,000 on PyPI
loguruLoguru provides a pre-configured logger that…
permissive · top 1,000 on PyPI
coloredlogsAdds colored output to Python's standard…
permissive · top 1,000 on PyPI
wandbwandb is a machine learning experiment tracking…
permissive · top 1,000 on PyPI
python3-logstashA Python logging handler that forwards log…
permissive · top 15,000 on PyPI
verboselogsAdds four custom logging levels (NOTICE, SPAM,…
permissive · top 15,000 on PyPI
python-logging-lokiA Python logging handler that sends log records…
permissive · top 5,000 on PyPI
google-cloud-appengine-loggingClient library for Google Cloud AppEngine…
permissive · top 1,000 on PyPI
logmuseAdds standard CLI logging options…
permissive · top 15,000 on PyPI
treelibProvides a simple tree data structure…
permissive · top 5,000 on PyPI
json-loggingConfigures Python's standard logging module to…
permissive · top 5,000 on PyPI
django-datadog-loggerIntegrates Django applications with Datadog…
permissive · top 15,000 on PyPI
pytest-loggerPytest-logger is a pytest plugin that…
permissive · top 15,000 on PyPI
flake8-loggingA Flake8 plugin that detects and flags common…
permissive · top 15,000 on PyPI