logging.addLevelName()
logging.addLevelName() is a Python function in the Logging Module category. Assigns a name to a custom log level integer. The syntax is logging.addLevelName(level, levelName). Parameters: level, levelName. Returns: None. A typical example: logging.addLevelName(15, "VERBOSE")
logging.log(15, "verbose message"). A close sibling is logging.basicConfig(), which configures the root logger with a basic configuration. A close sibling is logging.getLogger(), which returns a logger with the specified name or the root logger if name is None. A close sibling is logger.debug(), which logs a message with severity DEBUG (detailed diagnostic info). A close sibling is logger.info(), which logs a message with severity INFO (general operational messages). More about this category: Logging facility — basicConfig, getLogger, FileHandler, Formatter. For a broader walkthrough, read the Logging Module guide. Related Logging Module entries: logging.basicConfig(), logging.getLogger(), logger.debug(), logger.info(), logger.warning(), logger.error(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details.