[issue45027] Allow basicConfig to configure any logger, not just root

Vinay Sajip report at bugs.python.org
Mon Sep 20 04:20:02 EDT 2021


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> This selectively _disables_ a logger. That isn't the same thing as selectively _enabling_ only the loggers you want to enable.

Your earlier comment referred to getting unwanted messages from third-party loggers. Suppressing the messages implies disabling them in some way.

> That's fair enough, but why make people do the above (which is somewhat unintuitive)

That's your opinion, but it doesn't seem that this view is widespread. We provide basicConfig() for simple configuration and dictConfig() for more elaborate requirements; dictConfig() was reviewed by Python developers in PEP 391 and accepted.

> I could also publish this as a separate package on PyPI

By all means, do that. As I've already said, I've no wish to add yet another way of configuring logging. If your PyPI package gains wide adoption, we can always revisit this.

----------
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45027>
_______________________________________


More information about the Python-bugs-list mailing list