Skip to main content

Logging in YAML format

Project description

Yamlog uses a rotating file that rollovers at 128 KB, it writes messages in YAML format since it’s more easy to parse –using the international format for date and time–, and it also logs the higher-level messages to the standard error into single lines.

To setup the logging:

import yamlog
yamlog.setup(filename)

where filename is the file where is going to be logged; /tmp/python.log by default.

And to tear down it:

yamlog.teardown()

Then, in each module where is going to be used, there is to add:

import yamlog
_log = yamlog.logger(__name__)

so it passes the module name where it’s being run. Now, can be used the logging methods –debug(), info(), warning(), error(), critical()– to indicate the importance of a logged message.

Change history

v0.9, 2010-02-12

  • Initial release.

Project details


Release history Release notifications | RSS feed

This version

0.9

Download files

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

Source Distribution

Yamlog-0.9.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

Yamlog-0.9-py2.6.egg (8.7 kB view details)

Uploaded Source

File details

Details for the file Yamlog-0.9.tar.gz.

File metadata

  • Download URL: Yamlog-0.9.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Yamlog-0.9.tar.gz
Algorithm Hash digest
SHA256 56d9688a3cf25cb9e52023d26cc446e3cf5aece5f455a217b15da89dc86e7cbe
MD5 07d702e8c9d3a19f9bd55eb4c71f2893
BLAKE2b-256 d127a9738a4117eec006d8ee6f1c41011aa179e1df67895be9b8478cff0d0cb6

See more details on using hashes here.

File details

Details for the file Yamlog-0.9-py2.6.egg.

File metadata

  • Download URL: Yamlog-0.9-py2.6.egg
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Yamlog-0.9-py2.6.egg
Algorithm Hash digest
SHA256 6c867d292345d76b279153cd1db8db0c55c302723cb4bbde594fdb4f96ae3fc6
MD5 001c007bb6cefef1186169adf5d54e96
BLAKE2b-256 12d6163fa47e4de46ebf01c6e9cbf607bb6b41b6dfae2f5625ac41c2f85b768d

See more details on using hashes here.

Supported by

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