Barry Warsaw <barry <at> python.org> writes: > > On Dec 07, 2010, at 04:59 PM, Robert Kern wrote: > > >As a library author, I would dearly love to just add logging liberally > >without placing any additional burden to the users of my library. If my users > >wants to read those logs, he will configure logging. If he doesn't, he > >won't. With the current behavior, I can't do that. If I add logging, he has > >to add code just to silence a message that is meaningless to him (after I get > >the support emails asking if things are broken and explain how to silence > >it). If I add a NullHandler, I remove the ability for him to use > >logging.basicConfig(), the easiest and most straightforward way for him to > >add logging to his application. > > +1 > Barry, if you mean +1 as in "I agree this is how it should work", then we're all agreed. But I think Robert is wrong that NullHandler precludes use of basicConfig - when NullHandler is added to a library logger (rather than the root logger), basicConfig() works as expected. See the mylib/myapp example in my other post on this thread. Regards, Vinay Sajip
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4