pub enum Level {
Emergency = 0,
Alert = 1,
Critical = 2,
Error = 3,
Warning = 4,
Notice = 5,
Info = 6,
Debug = 7,
}
Expand description
Log Level of a log entry according to syslog.h as used in the journal.
Two convinience methods for the levels exist:
- as_raw_str(): returns a raw static &str to be used in log_raw_record()
- as_value_str(): returns a static &str to be used in log_record()
Variants§
Implementations§
Source§impl Level
impl Level
Sourcepub fn as_raw_str(&self) -> &str
pub fn as_raw_str(&self) -> &str
Return the raw level &’static str to be used in log_raw_message(), e.g. Level::Critical.as_raw_str() returns “PRIORITY=2”.
Sourcepub const fn as_value_str(&self) -> &str
pub const fn as_value_str(&self) -> &str
Returns the levels value as &’static str to be used in log_record(), e.g. Level::Critical.as_value_str() returns “2”.
Trait Implementations§
impl Eq for Level
impl StructuralPartialEq for Level
Auto Trait Implementations§
impl Freeze for Level
impl RefUnwindSafe for Level
impl Send for Level
impl Sync for Level
impl Unpin for Level
impl UnwindSafe for Level
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