Chris Jerdonek added the comment: > This documentation states that libraries can turn off logging by adding a > NullHandler:
I don't think that's what the documentation says. It says, "If for some reason you don’t want these messages printed *in the absence of any logging configuration* [my emphasis].... If the library user configures logging for application use, presumably that configuration will add some handlers, and if levels are suitably configured then logging calls made in library code will send output to those handlers, as normal." In other words, the documentation is acknowledging that logging won't get turned off if something else configures it. This is the same as what you say further on: > It only holds true if the application which calls the library has not called > basicConfig on the root logger. If there's some other part of the documentation that says otherwise, can you include a direct quote in the comment so we know what words you are referencing? > The correct way for a library to silence log messages is to both set a > NullHandler and set propagate to false. This doesn't sound like good practice to me and isn't what the current docs were trying to say. ---------- nosy: +chris.jerdonek, vinay.sajip status: open -> pending _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17075> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com