[ python-Bugs-876421 ] logging handlers raise exception on level
SourceForge.net
noreply at sourceforge.net
Sun Jan 18 14:02:09 EST 2004
Bugs item #876421, was opened at 2004-01-13 22:04
Message generated for change (Comment added) made by vsajip
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=876421&group_id=5470
Category: Python Library
Group: Python 2.3
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Jim Jewett (jimjjewett)
Assigned to: Vinay Sajip (vsajip)
Summary: logging handlers raise exception on level
Initial Comment:
logging.__version__ = "0.4.8.1" - matches CVS
Handler() takes a keyword argument of level, for the
initial level of message it should care about.
StreamHandler inherits from Handler, but does not pass
the level keyword through when calling Handler__init__.
#def __init__(self, strm=None):
def __init__(self, strm=None, **kwargs):
#Handler.__init__(self)
# should we delete the key that Stream uses?
Handler.__init__(self, **kwargs)
I am submitting as a bug rather than a patch because
several other classes have the same problem, and
because I am not sure whether arguments used by the
child initializer (such as strm) should be passed on.
----------------------------------------------------------------------
>Comment By: Vinay Sajip (vsajip)
Date: 2004-01-18 19:02
Message:
Logged In: YES
user_id=308438
I don't think this is a bug. You should consider that
Handler.__init__() takes a level argument with a default
value, rather than a keyword argument. This should be
treated as an internal implementation detail, used only by
subclasses of Handler. If you are writing a Handler subclass,
you can pass the level argument via your
HandlerSubclass.__init__() to Handler.__init__(). Otherwise,
you can set the level using Handler.setLevel().
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=876421&group_id=5470
More information about the Python-bugs-list
mailing list