New submission from Arne Babenhauserheide:

Currently the default operation of logging prints messages like the following:

INFO:root: Milk found.

This is close to a print-call, but not much more useful - especially not in 
small scripts. To make the default settings more useful to quick scripts, I 
would suggest adding the filename and linenumber by default. This would be 
equivalent to the following setup:

logging.basicConfig(
    level=logging.INFO, 
    format="%(levelname)s (%(filename)s::%(lineno)s): %(message)s")

With that setup, the above message would look like this:

INFO (move.py::23): Milk found.

----------
components: Library (Lib)
messages: 208812
nosy: ArneBab
priority: normal
severity: normal
status: open
title: Better logging defaults

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20345>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to