Autologging — easier logging and tracing for Python classes — Autologging 0.4.0 documentation

# Autologging — easier logging and tracing for Python classes

Release: | 0.4.0

The `autologging` module defines two decorators and a metaclass factory that make `logging` easier to use with classes.

Python 2.7 and Python 3.2+ are supported using the same codebase. All examples given on this site use Python 3 syntax.

## Table of Contents

- Introduction to Autologging
  - Logging and tracing “by hand”
  - Logging and tracing with `autologging`
- The `autologging` API
- Examples of using `autologging`
  - Using the `@logged` decorator
  - Using the `TracedMethods` metaclass factory and the `@traced` decorator
  - Using `@logged`, `TracedMethods`, and `@traced` together
  - Logging, tracing, and inheritance

## Download and Install

- Use “pip install Autologging”.
- Download a source or built distribution from Autologging on SourceForge and run either setup.py or the binary installer.
- Clone the Autologging Mercurial repository from BitBucket and run setup.py.

If you download or clone the source, the test suite can be run from the project root directory in either of the following ways:

    python -m unittest test.suite

or:

    python setup.py test

There are also a number of `doctest` tests embedded within Autologging’s docstrings (written using Python 3 syntax). If you are running Python 3.2+, you can run the doctests like so:

    python -m doctest autologging.py

## Indices and tables

- Index
- Module Index
- Search Page