[][src]Enum sd_journal::Level

pub enum Level {
    Emergency,
    Alert,
    Critical,
    Error,
    Warning,
    Notice,
    Info,
    Debug,
}

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

Emergency
Alert
Critical
Error
Warning
Notice
Info
Debug

Implementations

impl Level[src]

pub fn as_raw_str(&self) -> &str[src]

Return the raw level &'static str to be used in log_raw_message(), e.g. Level::Critical.as_raw_str() returns "PRIORITY=2".

pub const fn as_value_str(&self) -> &str[src]

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 Debug for Level[src]

impl Display for Level[src]

impl Eq for Level[src]

impl PartialEq<Level> for Level[src]

impl StructuralEq for Level[src]

impl StructuralPartialEq for Level[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.