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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56d9688a3cf25cb9e52023d26cc446e3cf5aece5f455a217b15da89dc86e7cbe |
|
MD5 | 07d702e8c9d3a19f9bd55eb4c71f2893 |
|
BLAKE2b-256 | d127a9738a4117eec006d8ee6f1c41011aa179e1df67895be9b8478cff0d0cb6 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c867d292345d76b279153cd1db8db0c55c302723cb4bbde594fdb4f96ae3fc6 |
|
MD5 | 001c007bb6cefef1186169adf5d54e96 |
|
BLAKE2b-256 | 12d6163fa47e4de46ebf01c6e9cbf607bb6b41b6dfae2f5625ac41c2f85b768d |