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 vinay.sajip
Recipients gwerbin, vinay.sajip
Date 2021-09-02.18:59:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630609192.72.0.99385860173.issue45027@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-09-02 18:59:52vinay.sajipsetrecipients: + vinay.sajip, gwerbin
2021-09-02 18:59:52vinay.sajipsetmessageid: <1630609192.72.0.99385860173.issue45027@roundup.psfhosted.org>
2021-09-02 18:59:52vinay.sajiplinkissue45027 messages
2021-09-02 18:59:52vinay.sajipcreate