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

2021-09-20 Thread Vinay Sajip
Vinay Sajip 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 th

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

2021-09-17 Thread Greg Werbin
Greg Werbin added the comment: > Users certainly don't need an API change to prevent that, should they wish > to. The following simple call will suffice (using 'gnupg' just as an example): > > logging.getLogger('gnupg').setLevel(logging.CRITICAL + 1) This selectively _disables_ a logger. That

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

2021-09-16 Thread Vinay Sajip
Vinay Sajip added the comment: > This change serves the purpose of making it easier to configure non-root > loggers. My point was, they don't need to configure non-root loggers (in terms of adding handlers) because the root logger's handlers will normally be used for all loggers. > However

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

2021-09-14 Thread Greg Werbin
Greg Werbin added the comment: Hi, thanks for the comment. > First of all, library developers should not be configuring loggers at all, > other than adding a NullHandler to their top-level logger. This is true, and I agree. I am not expecting people to start using basicConfig() inside their

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

2021-09-02 Thread Vinay Sajip
Vinay Sajip 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

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

2021-08-27 Thread Greg Werbin
Change by Greg Werbin : -- keywords: +patch pull_requests: +26452 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28010 ___ Python tracker ___

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

2021-08-26 Thread Greg Werbin
New submission from Greg Werbin : Hello all! I am proposing to add a "logger=" kwarg to logging.basicConfig(), which would cause the configuration to be applied to the specified logger. The value of this parameter could be a string or a logging.Logger object. Omitting logger= or passing logg