pub enum LogLevel {
Error = 0,
Warn = 1,
Info = 2,
Debug = 3,
Trace = 4,
}Expand description
Severity level of a log entry.
Variants are ordered by severity so that comparisons work intuitively:
Error is the most severe and Trace is the least.
use piquel_log::LogLevel;
assert!(LogLevel::Error < LogLevel::Warn);
assert!(LogLevel::Warn < LogLevel::Info);
assert!(LogLevel::Info < LogLevel::Debug);
assert!(LogLevel::Debug < LogLevel::Trace);This ordering is what powers [Filter::min_level]: passing
LogLevel::Warn keeps Error and Warn (both ≤ Warn in severity).
Variants§
Trait Implementations§
Source§impl From<LogLevel> for LevelFilter
impl From<LogLevel> for LevelFilter
Source§impl Ord for LogLevel
impl Ord for LogLevel
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for LogLevel
impl PartialOrd for LogLevel
impl Copy for LogLevel
impl Eq for LogLevel
impl StructuralPartialEq for LogLevel
Auto Trait Implementations§
impl Freeze for LogLevel
impl RefUnwindSafe for LogLevel
impl Send for LogLevel
impl Sync for LogLevel
impl Unpin for LogLevel
impl UnsafeUnpin for LogLevel
impl UnwindSafe for LogLevel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more