The zen of logging and YAML

Leave a comment

22/12/2012 by Gilles Lenfant

Python 2.7 and 3.2 come with a new way to configure the Python logging services with a standard dict. Is there a better way to let an user provide a dict than YAML ?

ConfigParser ? Uh ! Not sure. In addition, YAML provides OOTB lists, aliases, and even arbitrary Python objects.

Just having got the zen of complex logging and YAML, I write this self explanatory recipe for my memory and anyone who want to configure a complex logging with only some lines of Python. Any comment, question, improvement suggestion is welcome.

[gist /]



Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: