This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thbach
Recipients thbach
Date 2012-10-02.15:27:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Currently logging.config provides a fileConfig function which reads a ini-style file via configparser.ConfigParser. I would like to have a function e.g. configParserConfig which accepts a ConfigParser instance and configures logging directly from the settings found in there. The main reasons for this are:

1) I think it is rather common for an application that provides an interface to configure its logging via an ini file to use this ini file also for further application configuration. With the current implementation the file is read twice and ConfigParser is initialized two times.

2) Currently it is not idiomatic how to alter an ini-file configuration e.g. by options passed in via command-line. The new function provides a clear solution: create a ConfigParser instance, parse the ini file, alter the configuration and pass it on to logging.config.configParserConfig.

In fact, the new functionality is easy to achieve by refactoring logging.config a bit (see attached patch).
Date User Action Args
2012-10-02 15:27:11thbachsetrecipients: + thbach
2012-10-02 15:27:11thbachsetmessageid: <>
2012-10-02 15:27:11thbachlinkissue16110 messages
2012-10-02 15:27:10thbachcreate