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

# Autologging — easier logging and tracing for Python classes

Release: | 1.0.0

Autologging eliminates boilerplate logging setup code and tracing code, and provides a means to separate application logging from program flow and data tracing.

Python modules that make use of Autologging are cleaner, leaner, and more resilient to changes that would otherwise require updating tracing statements.

Autologging allows for tracing to be configured (and controlled) independently from application logging. Toggle tracing on/off, write trace log records to a separate log, and use different formatting for trace log entries - all via standard Python logging facilities, and without affecting your application logging.

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

Autologging exposes two decorators (`autologging.logged`, `autologging.traced`)) and a custom log level (`autologging.TRACE`).

## 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 `@traced` decorator
  - Using `@logged` and `@traced` together
  - Logging, tracing, and inheritance
  - Separate configurations for logging and tracing
- How does `autologging` work?

## Download and Install

The easiest way to install Autologging is to use pip:

    $ pip install Autologging

To install from source, clone or fork the repository:

    $ git clone https://github.com/mzipay/Autologging.git

Alternatively, download and extract a source _.zip_ or _.tar.gz_ archive from https://github.com/mzipay/Autologging/releases or https://pypi.python.org/pypi/Autologging.

Run the test suite and install the `autologging` module:

    $ cd Autologging
    $ python setup.py test
    $ python setup.py install

You can also install from one of the available binary packages. The Python wheel and egg are available from https://pypi.python.org/pypi/Autologging, and a Windows exe/msi installer can be downloaded from https://sourceforge.net/projects/autologging/files/.

## Indices and tables

- Index
- Module Index
- Search Page