Logging in YAML format
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)
filename is the file where is going to be logged; /tmp/python.log by
And to tear down it:
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.
- Initial release.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|Yamlog-0.9-py2.6.egg (8.7 kB) Copy SHA256 hash SHA256||Egg||2.6||Feb 12, 2010|
|Yamlog-0.9.tar.gz (6.4 kB) Copy SHA256 hash SHA256||Source||None||Feb 12, 2010|