Message171827
Thanks for the suggestion - I'm sorry, but I'm not inclined to add this. My reasoning is as follows:
1. I want to encourage usage of the dictConfig() API, as fileConfig() does not cover as much of the logging API as dictConfig() does (for example, Filters). I'd like to minimise the maintenance I have to do for fileConfig()-related code, and would prefer not to add any auxiliary APIs around fileConfig().
2. The file reading time and ConfigParser instantiation time are not likely to be a performance problem in practice, as logging configuration is an infrequent operation (a one-off operation in most cases).
3. You can also pass in a file-like object rather than a filename, and in that case, fileConfig() will use readfp() if available. While you might have to seek to the beginning of the file to pass it to another ConfigParser instance, that is likely to be just a pointer adjustment in a buffer rather than actual disk I/O (config files are usually pretty small).
I hope you will agree. I'll leave the issue as pending for now, and close it in a day or two. |
|
Date |
User |
Action |
Args |
2012-10-02 19:23:41 | vinay.sajip | set | recipients:
+ vinay.sajip, thbach |
2012-10-02 19:23:41 | vinay.sajip | set | messageid: <1349205821.41.0.139007188615.issue16110@psf.upfronthosting.co.za> |
2012-10-02 19:23:41 | vinay.sajip | link | issue16110 messages |
2012-10-02 19:23:40 | vinay.sajip | create | |
|