[issue6136] Make logging configuration files easier to use

Geoffrey Bache report at bugs.python.org
Wed Jun 3 20:08:43 CEST 2009


Geoffrey Bache <gjb1002 at users.sourceforge.net> added the comment:

OK, I'll take point (c) further on comp.lang.python. As for the others,
it would be useful if you could at least understand my points.

a) I'm aware that there isn't necessarily a one-to-one correspondence
between loggers and files, don't see why that's relevant. I have no idea
what the "common" way of using logging is, if there is one. Having lots
of files in a logging set up doesn't seem to me in any way unusual, even
if the number of loggers is potentially even larger.

The main question is the one I posed before: what is the point of
opening files that will never be written to and sockets that will never
be used? Or to put it another way, if I submitted a patch that only
created handlers that were used by at least one logger, would you look
at it?

b) "compulsory" as in "compulsory as an entry in the config file". The
code would be

if "qualname" in opts:
    qn = cp.get(sectname, "qualname")
else:
    qn = log

To make life easier for those of us who don't see the point in naming
loggers differently in the config file and in the code...

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6136>
_______________________________________


More information about the Python-bugs-list mailing list