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.

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.1.zip (326.8 kB view details)

Uploaded Source

Autologging-1.0.1.tar.gz (263.9 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.1.win32.msi (122.9 kB view details)

Uploaded Source

Autologging-1.0.1.win32.exe (142.3 kB view details)

Uploaded Source

Autologging-1.0.1-py2.py3-none-any.whl (12.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Autologging-1.0.1.zip.

File metadata

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

File hashes

Hashes for Autologging-1.0.1.zip
Algorithm Hash digest
SHA256 064f54d4059b4d29ae5b29b6c113f4da519fb25059158d3ff8b006d64e306926
MD5 75e8250692a9fe3caf64c94001539fc6
BLAKE2b-256 1d9d243abaf7eef5f12484fbe373da4511b67177142a437507f6301fa8ae1fc6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for Autologging-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9a21491e9e9d25977ad777c8d9833bbca62d2f86e69d5dad15de42c140b72540
MD5 ac69b6c451a4ef190436c1b24168bc88
BLAKE2b-256 d3751d9a92c5a3654b398f29042fc19677e8b30854b75340c181c619771956cc

See more details on using hashes here.

File details

Details for the file Autologging-1.0.1.win32.msi.

File metadata

  • Download URL: Autologging-1.0.1.win32.msi
  • Upload date:
  • Size: 122.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Autologging-1.0.1.win32.msi
Algorithm Hash digest
SHA256 e2f731fc0cb6653b2faab11a0c31e5baf35c38516a42e7abe7d648ff11afaeb9
MD5 b01044dfca43121a07fd323a7a1324f7
BLAKE2b-256 51fdbc78f734dd996f33cf2dca56fbcabc927000a9f37e4b925a8fe9a892df61

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for Autologging-1.0.1.win32.exe
Algorithm Hash digest
SHA256 48c79362ddcc01fa8d38e605d8c78bc500b34e53bd872dc391d65a20bead1505
MD5 6b4024f53109410b8b084760be399c21
BLAKE2b-256 2c126c5f899c85138cf597eb7e526ae5a64615572ac11d7ba3d602f61acddb46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Autologging-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c76a240ffb87d5f8ca26c11f089f4c7805599cafacc82d92c361e791aff05bed
MD5 16d669c613d06b8d93aa34abf74b0f1c
BLAKE2b-256 ef98160276357710aac0d5ac76cfe0bbbcd3536fec4cb22e341cb41bb42d996f

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