logging.addLevelName()

logging.addLevelName(lvl, levelName)

Associates level lvl with text levelName in an internal dictionary, which is used to map numeric levels to a textual representation, for example when a Formatter formats a message. This function can also be used to define your own levels. The only constraints are that all levels used must be registered using this function, levels should be positive integers and they should increase in increasing order of severity.

Note

If you are thinking of defining your own levels, please see the section on Custom Levels.

doc_python
2016-10-07 17:35:59
Comments
Leave a Comment

Please login to continue.