[Python-Dev] Planned changes to logging
adamsz at gmail.com
Fri Jul 16 09:18:01 CEST 2004
On Fri, 16 Jul 2004 07:02:37 +0100, Vinay Sajip
<vinay_sajip at red-dove.com> wrote:
> > One is a usability bug: calling fileConfig() disables any logger
> > objects already created that are not explicitly specified in the log
> > config file. Since loggers are often created when a module is
> It's not a bug, it's by design. The semantics of fileConfig() is that it
> completely replaces the existing configuration (in some scenarios, that's
> what you want). I'm thinking about a better way to configure the system -
> incremental rather than all-or-nothing. I will update the docstring to
> indicate this, as it's perhaps not clear enough.
OK, but a better implementation of these semantics would be to have
logging to one of these "replaced" log objects raise an exception
instead of continuing to accept log messages but silently have them
disappear into the ether -- that's what I mean by a "usability bug".
Better still, it seems entirely consistent with these semantics to
have the existing log objects reset to their parent settings -- just
like unspecified log objects created after the confguration load do.
I think this is more consistent, more intuitive, and doesn't require
you to figure out what logs may or exist throughout the system when
loading a configuration.
More information about the Python-Dev