logalpha.level
Level
A level associates a name and a value.
>>> level = Level(name='INFO', value=1) >>> level Level(name='INFO', value=1)
from_names
Construct a set of contiguous Levels.
>>> levels = Level.from_names(['Ok', 'Err']) >>> levels [Level(name='Ok', value=0), Level(name='Err', value=1)]
Comparisons operate on the value attribute.
value
__lt__
Returns self.value < other.value.
self.value < other.value
>>> a, b = Level.from_names(['A', 'B']) >>> assert a < b >>> assert b > a
__gt__
Similar to Level.__lt__().
Level.__lt__()
__le__
__ge__
For convenience and readability, a set of global named instances are included for the standard set of logging levels.
DEBUG
INFO
WARNING
ERROR
CRITICAL
LEVELS
logalpha.color