[New-bugs-announce] [issue11424] logging fileConfig may not correctly detect children

Mark Hammond report at bugs.python.org
Mon Mar 7 05:52:28 CET 2011

New submission from Mark Hammond <mhammond at users.sourceforge.net>:

fileConfig has code to detect existing "child" loggers and ensure they are enabled if the parent is configured.  However, the approach it takes of sorting the log names can fail in some cases.  eg, if 3 loggers exist with names like "bar", "bar.child" and "bar-etc", "bar.child" is not detected as a child of "bar" as "bar-etc" sorts in between "bar" and "bar.child".

Attaching a test case demonstrating this - things work correctly for "foo" and "foo.child" but not for "bar" and "bar.child" given the fact that "bar-etc" exists.

files: log_test.py
messages: 130224
nosy: mhammond, vinay.sajip
priority: normal
severity: normal
status: open
title: logging fileConfig may not correctly detect children
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file21026/log_test.py

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list