pub enum LogLevel {
Trace,
Debug,
Info,
Success,
Warning,
Error,
Critical,
}
Expand description
Represents the severity level of a log message. Levels are ordered from least to most severe.
Variants§
Trace
The lowest level of logging, used for very detailed debugging information.
Debug
Used for debugging information that might be useful in diagnosing problems.
Info
Used for informational messages that highlight the progress of the application.
Success
Used to indicate successful operations or positive outcomes.
Warning
Used for potentially harmful situations that might still allow the application to continue running.
Error
Used for error events that might still allow the application to continue running.
Critical
Used for very severe error events that will presumably lead the application to abort.
Implementations§
Source§impl LogLevel
impl LogLevel
Sourcepub fn as_u8(&self) -> u8
pub fn as_u8(&self) -> u8
Returns the numeric value of the log level. Uses standard logging level values (5, 10, 20, etc.)
Sourcepub fn reset_color() -> &'static str
pub fn reset_color() -> &'static str
Returns the ANSI reset code.
Sourcepub fn matches_module_pattern(&self, module_path: &str, pattern: &str) -> bool
pub fn matches_module_pattern(&self, module_path: &str, pattern: &str) -> bool
Checks if a module path matches the given pattern. The pattern can be a simple string match or a glob pattern.
pub fn to_string_colored(&self) -> String
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>,
Source§impl Ord for LogLevel
impl Ord for LogLevel
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.