pub enum LogLevel {
Debug = 1,
Error = 4,
Info = 2,
Trace = 0,
Warn = 3,
Off = -1,
}Variants§
Debug = 1
the debug designation (rank 1) often used for development
Error = 4
the error designation (rank 4) is used for errors that are not fatal to the program
Info = 2
the info designation (rank 2) is used for useful information
Trace = 0
the trace designation (rank 0) is used for very low-level (often extremely verbose) information
Warn = 3
The warn designation (rank 3)
Off = -1
the off designation (rank -1) is used to turn off logging
Implementations§
Source§impl LogLevel
impl LogLevel
pub fn from_tracing(level: Level) -> Self
Sourcepub fn as_tracing_level(&self) -> Option<Level>
pub fn as_tracing_level(&self) -> Option<Level>
convert the configured log level into a tracing level
Source§impl LogLevel
impl LogLevel
Sourcepub const fn is_debug(&self) -> bool
pub const fn is_debug(&self) -> bool
Returns true if the enum is LogLevel::Debug otherwise false
Sourcepub const fn is_error(&self) -> bool
pub const fn is_error(&self) -> bool
Returns true if the enum is LogLevel::Error otherwise false
Source§impl LogLevel
impl LogLevel
pub fn from_isize(level: isize) -> Self
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
returns true if the log-level is not Off
pub fn as_log_string<T>(&self, name: T) -> Stringwhere
T: Display,
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogLevel
impl<'de> Deserialize<'de> for LogLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntoEnumIterator for LogLevel
impl IntoEnumIterator for LogLevel
type Iterator = LogLevelIter
fn iter() -> LogLevelIter ⓘ
Source§impl Ord for LogLevel
impl Ord for LogLevel
Source§impl PartialOrd for LogLevel
impl PartialOrd for LogLevel
Source§impl VariantNames for LogLevel
impl VariantNames for LogLevel
impl Copy for LogLevel
impl Eq for LogLevel
impl Send for LogLevel
impl StructuralPartialEq for LogLevel
impl Sync for LogLevel
Auto Trait Implementations§
impl Freeze for LogLevel
impl RefUnwindSafe for LogLevel
impl Unpin 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