pub struct LogSeverity(/* private fields */);Expand description
The severity of the event described in a log entry, expressed as one of the standard severity levels listed below. For your reference, the levels are assigned the listed numeric values. The effect of using numeric values other than those listed is undefined.
You can filter for log entries by severity. For example, the following
filter expression will match log entries with severities INFO, NOTICE,
and WARNING:
severity > DEBUG AND severity <= WARNINGIf you are writing log entries, you should map other severity encodings to
one of these standard levels. For example, you might map all of Java’s FINE,
FINER, and FINEST levels to LogSeverity.DEBUG. You can preserve the
original severity level in the log entry payload if you wish.
Implementations§
Source§impl LogSeverity
impl LogSeverity
Sourcepub const DEFAULT: LogSeverity
pub const DEFAULT: LogSeverity
(0) The log entry has no assigned severity level.
Sourcepub const DEBUG: LogSeverity
pub const DEBUG: LogSeverity
(100) Debug or trace information.
Sourcepub const INFO: LogSeverity
pub const INFO: LogSeverity
(200) Routine information, such as ongoing status or performance.
Sourcepub const NOTICE: LogSeverity
pub const NOTICE: LogSeverity
(300) Normal but significant events, such as start up, shut down, or a configuration change.
Sourcepub const WARNING: LogSeverity
pub const WARNING: LogSeverity
(400) Warning events might cause problems.
Sourcepub const ERROR: LogSeverity
pub const ERROR: LogSeverity
(500) Error events are likely to cause problems.
Sourcepub const CRITICAL: LogSeverity
pub const CRITICAL: LogSeverity
(600) Critical events cause more severe problems or outages.
Sourcepub const ALERT: LogSeverity
pub const ALERT: LogSeverity
(700) A person must take an action immediately.
Sourcepub const EMERGENCY: LogSeverity
pub const EMERGENCY: LogSeverity
(800) One or more systems are unusable.
Sourcepub fn as_str_name(&self) -> Cow<'static, str>
pub fn as_str_name(&self) -> Cow<'static, str>
Gets the enum value as a string.
Sourcepub fn from_str_name(name: &str) -> Option<Self>
pub fn from_str_name(name: &str) -> Option<Self>
Creates an enum value from the value name.
Trait Implementations§
Source§impl Clone for LogSeverity
impl Clone for LogSeverity
Source§fn clone(&self) -> LogSeverity
fn clone(&self) -> LogSeverity
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more