Bugs item #1354052, was opened at 2005-11-11 07:03 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1354052&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Jonathan S. Joseph (jsjoseph) >Assigned to: Vinay Sajip (vsajip) Summary: logging: Default handlers broken Initial Comment: Hi, There is a strange behaviour in logging. When a new logger is created, its doesn't have any handlers... until the root logger is invoked, at which point the new logger uses the same handler as the root handler. See the following code snippet as an illustration of the bug: Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from logging import * >>> z = getLogger("z") >>> z.warning("The Larch.") No handlers could be found for logger "z" >>> warning("Bicycle Repair Man!") WARNING:root:Bicycle Repair Man! >>> z.warning("The Larch.") WARNING:z:The Larch. ---------------------------------------------------------------------- >Comment By: Neal Norwitz (nnorwitz) Date: 2005-11-11 17:51 Message: Logged In: YES user_id=33168 This may have been fixed recently. Vinay? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1354052&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com