ID EN
Logging

addLevelName

Python 3.11

Associates level level 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.

Syntax

PYTHON
logging.addLevelName(level, levelName)

See Also

Formatter Custom Levels