skillfed

Autologging

Autologging makes logging and tracing Python classes easy.

autologging v1.3.2 469.6K downloads/30d#6,487 on PyPI
Permissive license MIT License Abandoned released

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 autologging

uv

uv add autologging

poetry

poetry add autologging

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: IronPythonProgramming Language :: Python :: Implementation :: JythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Python :: Implementation :: StacklessTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Logging

Tags

automatic logging decoratormethod tracing pythonreduce logging boilerplateclass logging setuptrace function callsseparate tracing from loggingpython logging decorator
decorator-basedabandoned

More Libraries packages