Multiple calls to logging.config.fileConfig

Almad bugs at
Thu Oct 5 11:42:57 CEST 2006


our applications can have plugins as subpackages and I'd like to allow
them to use their own logger as well as it's configuration. I thought
that best way will be their own configuration file passed to

However, I run into problems...

1) It seems that I cannot refer to something from previously loaded
files, i.e. I'd like application config file to specify formatters and
handlers and plugins only referring them.

2) I'm not sure about "appending" loggers; if I specify
keys: web

and then
keys: syncml

Will web not be overwritten?

3) Finally, I run into "root" problem. In second call, if I specify
root logger again:

keys: root,web


level: WARNING
qualname: xxx.web
handlers: console

I'll get

Traceback (most recent call last):
  File "/usr/lib/python2.4/logging/", line 143, in fileConfig

If I'll set only web as logger, I'll get standard NoSectionFound

Any idea how to fix this? It seems that I have to write custom parser
merging all files and config logging directly from code, but I'd like
to assure that it's the standard way...



More information about the Python-list mailing list