[][src]Enum gelf::Level

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

GELF's representation of an error level

GELF's error levels are equivalent to syslog's severity information (specified in RFC 5424)

The levels dont match logs levels, but (lossy) conversion methods are provided. These methods follow this conversion table:

GELF / SyslogRust
Emergency (0)Error (1)
Alert (1)Error (1)
Critical (2)Error (1)
Error (3)Error (1)
Warning (4)Warn (2)
Notice (5)Info (3)
Informational (6)Info (3)
Debug (7)Debug (4)
Debug (7)Trace (5)

Variants

Emergency
Alert
Critical
Error
Warning
Notice
Informational
Debug

Methods

impl Level[src]

pub fn from_rust(level: LogLevel) -> Level[src]

Get the GELF error level from given Rust error level

pub fn to_rust(self) -> LogLevel[src]

Get the Rust error level from this GELF error level

Trait Implementations

impl Clone for Level[src]

impl Copy for Level[src]

impl Debug for Level[src]

impl<'de> Deserialize<'de> for Level[src]

impl From<Level> for Level[src]

fn from(level: LogLevel) -> Level[src]

Allow for Into conversion from Rust's LogLevel

impl From<f64> for Level[src]

impl From<i64> for Level[src]

impl Into<Level> for Level[src]

fn into(self) -> LogLevel[src]

Allow for Into conversion to Rust's LogLevel

impl Into<LevelFilter> for Level[src]

fn into(self) -> LogLevelFilter[src]

Allow for Into conversion from Rust's LogLevelFilter

impl<'_> Into<i8> for &'_ Level[src]

impl PartialEq<Level> for Level[src]

impl Serialize for Level[src]

impl StructuralPartialEq for Level[src]

Auto Trait Implementations

impl RefUnwindSafe for Level

impl Send for Level

impl Sync for Level

impl Unpin for Level

impl UnwindSafe for Level

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,