[New-bugs-announce] [issue20345] Better logging defaults
Arne Babenhauserheide
report at bugs.python.org
Wed Jan 22 15:25:20 CET 2014
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 <report at bugs.python.org>
<http://bugs.python.org/issue20345>
_______________________________________
More information about the New-bugs-announce
mailing list