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

> Actually people do this all the time, to deactivate the logging of some 
> third-party libraries (me included).

It would be better to set the level of those loggers to e.g. ERROR or CRITICAL 
rather than disabling them altogether - presumably if something bad happens in 
those packages, one would want to know!

> In addition, all public attributes ... can be set from 
> `logging.config.dictConfig`, except the `disabled` attribute, which is 
> inconsistent.

I don't especially want people to use `disabled` for this type of thing - the 
main reason for having it is that following an on-the-fly reconfiguration in a 
long-running process, some threads might still be active that contain 
references to now-unwanted loggers, and disabling makes those references 
inactive without the need to track them down. I would recommend using e.g. 
CRITICAL as a level for the use case you mention.

----------

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

Reply via email to