Enum gelf::Level

source ·
pub enum Level {
    Emergency,
    Alert,
    Critical,
    Error,
    Warning,
    Notice,
    Informational,
    Debug,
}
Expand description

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

Implementations

Get the GELF error level from given Rust error level

Get the Rust error level from this GELF error level

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Allow for Into conversion from Rust’s LogLevel

Allow for Into conversion to Rust’s LogLevel

Allow for Into conversion from Rust’s LogLevelFilter

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.