Skip to main content

Autologging makes logging and tracing Python classes easy.

Project description

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.

Autologging exposes two decorators and a custom log level:

@logged Decorate a class to create a __log member. The logger is named by default to match the dotted-name of the containing class. A function may also be decorated, creating a _log attribute on the function object whose default name matches the containing module. A specifically-named logger may also be passed to the decorator (i.e. @logged(my_logger)).

@traced Decorate a class to provide automatic method call/return tracing. By default, all class, static, and instance methods are traced (excluding “__special__” methods, with the exception of __init__). As with the logged decorator, the default name of the tracing logger matches the dotted-name of the containing class and may be overridden by passing a specifically-named logger to the decorator. Additionally, this decorator accepts multiple string arguments that explicitly name the methods to be traced (and may even name “__special__” methods). Module-level functions may also be traced using this decorator.

TRACE The autologging.TRACE (level 1) log level is registered with the Python logging module when Autologging is imported so that tracing can be configured and controlled independently of application logging.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

Autologging-1.0.0.zip (326.2 kB view details)

Uploaded Source

Autologging-1.0.0.tar.gz (260.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

Autologging-1.0.0.win32.exe (141.4 kB view details)

Uploaded Source

Autologging-1.0.0-py2.py3-none-any.whl (11.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Autologging-1.0.0.zip.

File metadata

  • Download URL: Autologging-1.0.0.zip
  • Upload date:
  • Size: 326.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Autologging-1.0.0.zip
Algorithm Hash digest
SHA256 ab1123677feffb5a4b59c60ed0d11ba8b96d01a8ee5bd6e0898d47842d5d7a6a
MD5 f392367c5a079268c2ae7552d287eee6
BLAKE2b-256 70219b4ffcce3af37623f1210603551e8d1b211312c7f9cbd27dcbd98ab8894e

See more details on using hashes here.

File details

Details for the file Autologging-1.0.0.tar.gz.

File metadata

  • Download URL: Autologging-1.0.0.tar.gz
  • Upload date:
  • Size: 260.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Autologging-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1760d6dc818afb4dfdcb11c11f09e3518a5a0951b8577730aeedec1a838b3508
MD5 85398cca0953d7ec2f1b22c58e9b9e37
BLAKE2b-256 83885ac1ded8f2c97726110d1b99873e2b2239e9cfb169a451ba08cd697ff2fa

See more details on using hashes here.

File details

Details for the file Autologging-1.0.0.win32.exe.

File metadata

  • Download URL: Autologging-1.0.0.win32.exe
  • Upload date:
  • Size: 141.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Autologging-1.0.0.win32.exe
Algorithm Hash digest
SHA256 5bc2931017c88f429ff3ffc7c89bc95b8b715d4266232c05a3d2b79531360144
MD5 8162441eb9375a114346c68b1d970f89
BLAKE2b-256 53f0bc7f99c55ac5795a47f62695fdb44f6d521f400e902a07f7bed5c5e2304a

See more details on using hashes here.

File details

Details for the file Autologging-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Autologging-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4e067b97a3d2bab2a3bf250da83d606a85efc206fa00e6dc1e741345bc2e7c35
MD5 ae6ca2aac341ecb37f3ccb90ab0cf69c
BLAKE2b-256 4b3b33b431d94220ab98dc8abfa724e13d17b9867cc458382f6bcb6475aa92f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page