[Python-Dev] Using logging in the stdlib and its unit tests (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Wed Dec 8 15:56:14 CET 2010
- Previous message: [Python-Dev] Using logging in the stdlib and its unit tests
- Next message: [Python-Dev] Using logging in the stdlib and its unit tests
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Dec 9, 2010 at 12:43 AM, Fred Drake <fdrake at acm.org> wrote:
On Wed, Dec 8, 2010 at 9:27 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
The thing is, they don't want to configure them, but you force them to do some configuration if they don't want error messages to be silenced. As I tried to explain earlier, a NullHandler doesn't silence anything except the message about logging not being configured. Propagation is not controlled by the handlers, but by the loggers.
If the only handler is NullHandler though, (or if there are no handlers configured at all) then output does get silenced by default, even errors and warning messages. The application has to (directly or indirectly) configure logging with additional handlers in order for the output to appear somewhere. That's the behaviour that is inappropriate for use cases like the concurrent.futures handling of unraisable errors that started this discussion over on the bug tracker.
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] Using logging in the stdlib and its unit tests
- Next message: [Python-Dev] Using logging in the stdlib and its unit tests
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]