On Tue, 7 Dec 2010 23:45:39 +0000 (UTC) Vinay Sajip <vinay_sa...@yahoo.co.uk> wrote: > Antoine Pitrou <solipsis <at> pitrou.net> writes: > > > > > I thought "error" and "critical" messages were logged to stderr by > > default? Isn't it the case? > > > > Only if you call basicConfig() or use the logging.debug(), logging.info(), > etc. > module-level convenience functions (which call basicConfig under the hood).
Why wouldn't it be the default for all logging calls ? Such special cases don't really make things easy to remember. > When is the NullHandler needed? Only for cases where an application developer > uses a library which does logging under the covers (for those users who might > be > interested in logging its operations), but where that application developer > doesn't use logging themselves for that application. You seem pretty tied up to the "application developer" situation. There are cases (scripts, prototyping, etc.) where you certainly want to see error messages (errors should not pass silently) but don't want to configure logging for each of the libraries you use. Having convenient and understandable defaults would go a long way towards making logging more usable, IMO. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com