Log Levels¶
This module provides log level definitions for ctxlog.
- class ctxlog.level.LogLevel(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
EnumLog levels for ctxlog.
- DEBUG = 10¶
- INFO = 20¶
- WARNING = 30¶
- ERROR = 40¶
- CRITICAL = 50¶
- classmethod from_string(level_str)[source]¶
Convert a string to a LogLevel.
- Parameters:
level_str (
str) – The string representation of the log level.- Return type:
- Returns:
The corresponding LogLevel enum value.
- Raises:
ValueError – If the string is not a valid log level.
LogLevel Enum¶
- class ctxlog.level.LogLevel(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
EnumLog levels for ctxlog.
- DEBUG = 10¶
- INFO = 20¶
- WARNING = 30¶
- ERROR = 40¶
- CRITICAL = 50¶
- classmethod from_string(level_str)[source]¶
Convert a string to a LogLevel.
- Parameters:
level_str (
str) – The string representation of the log level.- Return type:
- Returns:
The corresponding LogLevel enum value.
- Raises:
ValueError – If the string is not a valid log level.