pub enum Level {
Trace = 0,
Debug = 1,
Info = 2,
Warning = 4,
Error = 3,
Fatal = 5,
Panic = 6,
}Expand description
Log level definition.
Loggers evaluates these in descending order, so f.ex. a log level of Level::Info includes
Level::Warning and Level::Panic, but not Level::Debug.
Variants§
Trace = 0
Used for tracing code execution path. Rasant will log some operations at this level, such as sink additions and log level changes.
Debug = 1
Messages useful for debugging and troubleshooting.
Info = 2
Normal operation updates.
Warning = 4
Unusual events that might require attention, but do not otherwise impact normal operation.
Error = 3
Error updates.
Fatal = 5
Appplication-wide errors from which recovery is impoosible.
Panic = 6
Similar to Level::Fatal, but the application panics right after logging the update.
Implementations§
Source§impl Level
impl Level
Sourcepub fn covers(&self, other: &Level) -> bool
pub fn covers(&self, other: &Level) -> bool
Evaluates whether this level covers another - i.e. it’s at the same, or higher level.
Sourcepub fn includes(&self, other: &Level) -> bool
pub fn includes(&self, other: &Level) -> bool
Evaluates whether this level is covered by another.
Sourcepub fn color(&self) -> Color
pub fn color(&self) -> Color
Returns a color associated with a given level, useful mostly for pretty printing.
Sourcepub fn as_short_str(&self) -> &str
pub fn as_short_str(&self) -> &str
Returns a short, three-letter name for the level.