Proposed changes to logging defaults

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Dec 15 03:13:55 EST 2010


On Dec 15, 3:51 am, samwyse <samw... at gmail.com> wrote:

> I'm in favor of this change.  I've long wished that I could just add
> lots of warning/error/infologgingto a script and have it just work
> without having to spend time configuring theloggingsystem.

Note that INFO logging will still not be sent to sys.stderr. Only
events of severity WARNING and above will be logged to sys.stderr. If
you need INFO logging as well, it's easy enough to configure for a
simple script (to get the same effect):

basicConfig(level=logging.INFO, format='%(message)s') # or whatever
level/format you need

So I'm not sure how much time you really have to spend on configuring
logging.

Regards,

Vinay Sajip



More information about the Python-list mailing list