[ python-Bugs-1008295 ] logging.getLevelName returns a number

SourceForge.net noreply at sourceforge.net
Fri Aug 20 14:36:41 CEST 2004


Bugs item #1008295, was opened at 2004-08-12 21:56
Message generated for change (Comment added) made by vsajip
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1008295&group_id=5470

Category: Python Library
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Paulo Eduardo Neves (neves)
Assigned to: Vinay Sajip (vsajip)
Summary: logging.getLevelName returns a number

Initial Comment:
logging.getLevelName function doc says that it returns
the "textual representation of logging level", but if
the argument is already the level name, the log level
integer is returned. It should return the argument.

The problem is that if I add my own levels, and call
LoggerInstance.log( levelName, message ), the formatter
will save the level number in the log, insted of the
desired level name. 

----------------------------------------------------------------------

>Comment By: Vinay Sajip (vsajip)
Date: 2004-08-20 12:36

Message:
Logged In: YES 
user_id=308438

This is not a bug, it's by design. Current CVS throws an
exception if raiseExceptions is set and you pass anything
other than an integer as the log level. The CVS
documentation has also been updated to clarify that the
level passed in is the integer rather than the level name.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1008295&group_id=5470


More information about the Python-bugs-list mailing list