Skip to main content

Autologging makes logging and tracing Python classes easy.

Project description

Autologging provides two decorators and a metaclass factory:

@logged

Decorate a class (or function) to create a __logger member. The logger is automatically named to match the dotted-name of the class or module. Alternatively, provide a specific logger by passing it to the decorator (i.e. logged(my_logger)).

@traced

Decorate a module-level function to provide call/return tracing. The log record attributes pathname, filename, lineno, module, and funcName work as expected (i.e. they refer to the original function, NOT the proxy function returned by the decorator).

TracedMethods

Create a metaclass that adds automatic tracing to specified class methods (just like @traced does for module-level functions). The log record attributes pathname, filename, lineno, module, and funcName work as expected (i.e. they refer to the original class method, NOT the proxy method installed by the metaclass).

Additionally, an autologging.TRACE (level 1) custom log level is registered with the Python logging module so that tracing messages can be toggled on/off independently of DEBUG-level 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-0.4.0.zip (180.3 kB view details)

Uploaded Source

Autologging-0.4.0.tar.gz (139.5 kB view details)

Uploaded Source

Built Distributions

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

Autologging-0.4.0-py3.4.egg (20.6 kB view details)

Uploaded Egg

Autologging-0.4.0-py3.3.egg (20.8 kB view details)

Uploaded Egg

Autologging-0.4.0-py3.2.egg (20.5 kB view details)

Uploaded Egg

Autologging-0.4.0-py2.py3-none-any.whl (12.2 kB view details)

Uploaded Python 2Python 3

Autologging-0.4.0-py2.7.egg (20.4 kB view details)

Uploaded Egg

File details

Details for the file Autologging-0.4.0.zip.

File metadata

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

File hashes

Hashes for Autologging-0.4.0.zip
Algorithm Hash digest
SHA256 8b824d7b37250cb2cfbe11a261f8ba595d46132d57339f440c0b11113dd68e52
MD5 ef208ca87df1742249499e44e31f0b75
BLAKE2b-256 3547b66432270fd0ca82cb6f52db0c666006455ce38a398180fe7e05e1edcce0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for Autologging-0.4.0.tar.gz
Algorithm Hash digest
SHA256 af2d6cf66e72c26445a9dcd305371e2c9e0257430c22b56ea77388a1cd08421c
MD5 ff3c64679689a2a1a8318922e8db6671
BLAKE2b-256 b8ef89d68e708cf76a4fb059bc961acf1c55c0cb298361b3942e1ad59df233ea

See more details on using hashes here.

File details

Details for the file Autologging-0.4.0-py3.4.egg.

File metadata

File hashes

Hashes for Autologging-0.4.0-py3.4.egg
Algorithm Hash digest
SHA256 0c6ebd7ac2ada649caffb3bfb0c209ffb9fd13a85712fb4debe37bbe0b8d57cc
MD5 237c8220fa20b73797b6df25f8461796
BLAKE2b-256 0490edfc3a4659912d144276fb16f8811dfbc33828d70feae908e3e84351e172

See more details on using hashes here.

File details

Details for the file Autologging-0.4.0-py3.3.egg.

File metadata

File hashes

Hashes for Autologging-0.4.0-py3.3.egg
Algorithm Hash digest
SHA256 150a0cc1a435e21cd6dd310d0d22f689e6e18a02aeb29d63f10de086d7059412
MD5 9989b7e3829981ee8750e6e2dee59a38
BLAKE2b-256 28224c491ec6c55d7229ac50cd7e5f6af6d83089b1ac8ce7d8ba95d9d090ea17

See more details on using hashes here.

File details

Details for the file Autologging-0.4.0-py3.2.egg.

File metadata

File hashes

Hashes for Autologging-0.4.0-py3.2.egg
Algorithm Hash digest
SHA256 d728c7ed6bacdb11bd4f4fdaf960c154eb10e96204a537426c7fcc1cccf5d1a1
MD5 0b3586fc235dec3086ba653ba23c402e
BLAKE2b-256 edcdcc20a71bea89924386c249122e467d47cbdfbb3f4997b929f6ea4348b950

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Autologging-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1ef9db049b1b6702c83e41015402d820a69058263cb728d84d2f8365ef2d2f65
MD5 a52648578662434376892934b4e37a57
BLAKE2b-256 800078de2e0cb49fde54d8393d8c10828f896a7454ef109778a5e5a47b9199ea

See more details on using hashes here.

File details

Details for the file Autologging-0.4.0-py2.7.egg.

File metadata

File hashes

Hashes for Autologging-0.4.0-py2.7.egg
Algorithm Hash digest
SHA256 22086226677d5ea961535e2e7dbfff33cae6bf365560633bfe9a39e94b9d31f0
MD5 b7b66ad60736352f041939a3a9b8cfb4
BLAKE2b-256 62a2c4cb0a943bcc2b586d72b62929fb74cf14ece8140d907afe27ebc6b0f3af

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