Vinay Sajip <vinay_sa...@yahoo.co.uk> added the comment:

Thanks, but ...

> I observe that many Python users tend to use basicConfig() even when they 
> would be better served by configuring only the logger(s) needed for their own 
> app/library.

First of all, library developers should not be configuring loggers at all, 
other than adding a NullHandler to their top-level logger.

Secondly, it is fine to configure the root logger and then log to any other 
logger. The default mechanisms mean that handlers added to the root logger are 
used by loggers which are anywhere in the logger hierarchy. So users that are 
using basicConfig() but other loggers than the root logger may be using the 
system as designed.

Thirdly, logging.config.dictConfig() allows usage of a dictionary to configure 
multiple loggers, handlers etc. all at once, for use cases which are more 
demanding than basicConfig(). It doesn't make sense to do what you're 
proposing, since it appears to offer a different way of configuring other 
loggers than the root logger, when dictConfig() already offers that.

So, I am minded to not agree to this change, and would prefer that the PR and 
this issue be closed.

----------
nosy: +vinay.sajip

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45027>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to