structlog_config.levels#
Functions#
|
Compare log levels using logging.getLevelNamesMapping for accurate int values. |
|
Translate a log level name to its numeric value |
|
Return True when the global logger is configured for DEBUG or TRACE verbosity. |
Module Contents#
- structlog_config.levels.compare_log_levels(left: str, right: str) int[source]#
Compare log levels using logging.getLevelNamesMapping for accurate int values.
Example: >>> compare_log_levels(“DEBUG”, “INFO”) -1 # DEBUG is less than INFO
Asks the question “Is INFO higher than DEBUG?”