Description
This is something in between a bug and a feature. However if we want someone using its own logging methods we can't use the default of disable_existing_loggers=1 for logging.config.fileConfig.
Help on function fileConfig in module logging.config: fileConfig(fname, defaults=None, disable_existing_loggers=1) Read the logging configuration from a ConfigParser-format file.
This var and its default isn't described in python docs.
introduced in python: revision 64416, Thu Jun 19 22:40:17 2008 UTC (described docs py3k)
Component selection
MoinMoin.log
Details
MoinMoin Version
1.9 and maybe olders
OS and Version
Python Version
Server Setup
Server Details
Language you are using the wiki in (set in the browser/UserPreferences)
Workaround
Discussion
If we can't change the default I like to have it configurable.
1 --- a/MoinMoin/log.py Wed Apr 28 12:29:55 2010 +0200
2 +++ b/MoinMoin/log.py Wed Apr 28 19:03:41 2010 +0200
3 @@ -120,7 +120,7 @@
4 if conf_fname:
5 try:
6 conf_fname = os.path.abspath(conf_fname)
7 - logging.config.fileConfig(conf_fname)
8 + logging.config.fileConfig(conf_fname, disable_existing_loggers=0)
9 configured = True
10 l = getLogger(__name__)
11 l.info('using logging configuration read from "%s"' % conf_fname)
12 @@ -131,7 +131,7 @@
13 # load builtin fallback logging config
14 from StringIO import StringIO
15 config_file = StringIO(logging_config)
16 - logging.config.fileConfig(config_file, logging_defaults)
17 + logging.config.fileConfig(config_file, logging_defaults, disable_existing_loggers=0)
18 configured = True
19 l = getLogger(__name__)
20 if err_msg:
Plan
- Priority:
- Assigned to:
- Status: