Autologging
Autologging makes logging and tracing Python classes easy.
What it is and what it does
Autologging is a decorator-based library that eliminates boilerplate logging and tracing code in Python classes and functions. It provides two main decorators—`logged` to inject a logger into a class or function, and `traced` to automatically log method calls, returns, and yields—plus a custom TRACE log level that sits below standard logging levels. This separation lets you toggle tracing on and off independently from application logging, write trace records to a separate log file, and use different formatting for trace output, all through standard Python logging facilities.
The library is designed to keep code cleaner by removing manual logging setup and tracing statements. It supports tracing of class methods, static methods, instance methods, module-level functions, and generator iterators. Tracing can be disabled entirely via an environment variable or function call when not needed.
Use it for:
- Debug class behavior by automatically logging all method entries, exits, and return values without adding trace statements to every method.
- Separate diagnostic tracing from production application logging, routing trace output to a different handler or file.
- Reduce boilerplate in large codebases by decorating classes once instead of adding logger setup and trace calls throughout.
- Monitor generator function execution by automatically logging yield and stop events for generator iterators.
- Quickly enable or disable all tracing across an application via environment variable without code changes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Autologging provides decorators to automatically inject logging and method-call tracing into Python classes and functions, eliminating boilerplate setup code and allowing tracing to be configured independently from application logging.
No. While the package is lightweight and permissively licensed, it has been abandoned since 2019 with no maintenance or security updates. For new projects, consider actively maintained alternatives. For legacy codebases already using it, the lack of updates poses a long-term risk as Python evolves.
Install
autologging on PyPI
pip
pip install autologginguv
uv add autologgingpoetry
poetry add autologgingInstalling Autologging
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2019-04-20 with no active maintenance or security updates expected.
License in practice
MIT License (permissive). You may use, modify, and distribute this package freely in both open-source and proprietary projects, provided you retain the license notice.
Quickstart
pip install Autologging
import logging
from autologging import logged, traced, TRACE
@traced
@logged
class MyClass:
def my_method(self):
self.__log.info("doing work")
logging.basicConfig(level=TRACE)
obj = MyClass()
obj.my_method()
Verify before relying
- Whether the package works reliably with Python versions released after 2019
- Whether generator tracing (added in version 1.2.0) is fully stable across modern Python implementations
- Current state of the upstream repository and whether it accepts pull requests or security patches
Package facts
| License | MIT License (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,673 days since the last release |
| First released | |
| Downloads | 469,565/month — #6,487 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: Autologging-1.3.2-py2.py3-none-any.whl
Keywords: logging, tracing
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
logdecoratorLogdecorator provides Python decorators to add…
permissive · top 15,000 on PyPI
logfuryLogfury adds automatic method-call tracing to…
permissive · top 15,000 on PyPI
minilogMinilog wraps Python's standard logging module…
permissive · top 15,000 on PyPI
decopatchDecopatch simplifies writing decorators in…
permissive · top 5,000 on PyPI
entrypointProvides a decorator to mark functions as entry…
permissive · top 15,000 on PyPI
eliotEliot is a structured logging system that…
permissive · top 15,000 on PyPI
codetimingMeasures elapsed time in Python code using a…
permissive · top 5,000 on PyPI
PySnooperPySnooper is a decorator-based debugging tool…
permissive · top 15,000 on PyPI
snoopsnoop adds decorator-based and context-manager…
permissive · top 15,000 on PyPI
autocommandAutocommand converts a Python function into a…
copyleft · top 5,000 on PyPI