This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinay.sajip
Recipients alexl, r.david.murray, vinay.sajip
Date 2009-07-07.07:09:59
SpamBayes Score 1.2626523e-05
Marked as misclassified No
Message-id <>
The change that I made was in the wrong place - it should have been in
the setLevel rather than in basicConfig itself. However, this would not
have covered setLevel for Handlers...

That setLevel behaves differently to basicConfig for the level argument
could be seen as a bug. ISTM I should add a function _checkLevel as follows:

def _checkLevel(level):
    if isinstance(level, int):
        rv = level
    elif str(level) == level:
        if level not in _levelNames:
            raise ValueError("Unknown level: %r" % level)
        rv = _levelNames[level]
        raise TypeError("Level not an integer or a valid string: %r" %
    return rv

and then have all setLevel(level) methods do a "level =
_checkLevel(level)" before actually setting the level.
Date User Action Args
2009-07-07 07:10:01vinay.sajipsetrecipients: + vinay.sajip, r.david.murray, alexl
2009-07-07 07:10:01vinay.sajipsetmessageid: <>
2009-07-07 07:09:59vinay.sajiplinkissue6314 messages
2009-07-07 07:09:59vinay.sajipcreate