#[repr(u32)]#[non_exhaustive]pub enum LogLevel {
Trace,
Debug,
Info,
Warn,
Error,
Off,
Audit,
Open,
Close,
}
Expand description
Levels for logging
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Trace
Tracing (very low priority or verbose logging)
Debug
Debugging (low priority logging)
Info
Informational logging
Warn
Warnings
Error
Errors
Off
Logging level used to disable logging of severity-based logging levels. Anything logged at this level will be ignored.
Audit
Audit-level log-records are sets of key-value pairs that are intended for machine processing. The formatted log-message should be a simple record tag, with all the variable data in key-value pairs. This corresponds to trace events in OpenTelemetry, or what are called ‘metrics’ in some other systems.
Open
Span open. For an actor, this means actor startup. The
formatted text contains the name of the object, e.g. the actor
name. If the parent logging-ID is known, it is passed as a
parent
key-value pair.
Close
Span close. For an actor, this means actor termination. The
formatted text may give a description of why the span closed
if there was a problem. In case of actor failure, one of
these presence key-values will be added: failed
, dropped
or killed
.
Implementations§
Trait Implementations§
source§impl From<LogLevel> for LogFilter
impl From<LogLevel> for LogFilter
source§fn from(level: LogLevel) -> Self
fn from(level: LogLevel) -> Self
Convert a LogLevel
into a LogFilter
. Where a severity
level (LogLevel::Trace
to LogLevel::Error
) is passed,
all higher severity levels are also enabled. Where
LogLevel::Open
or LogLevel::Close
is passed, the other
is also enabled. LogLevel::Audit
only enables itself.
LogLevel::Off
gives no levels enabled.
source§impl FromStr for LogLevel
impl FromStr for LogLevel
source§fn from_str(s: &str) -> Result<LogLevel, LogLevelError>
fn from_str(s: &str) -> Result<LogLevel, LogLevelError>
This does a case-insensitive match to the level names as
returned by LogLevel::name
§type Err = LogLevelError
type Err = LogLevelError
source§impl Ord for LogLevel
impl Ord for LogLevel
source§impl PartialEq<LogLevel> for LogLevel
impl PartialEq<LogLevel> for LogLevel
source§impl PartialOrd<LogLevel> for LogLevel
impl PartialOrd<LogLevel> for LogLevel
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<u8> for LogLevel
impl TryFrom<u8> for LogLevel
source§fn try_from(value: u8) -> Result<Self, LogLevelError>
fn try_from(value: u8) -> Result<Self, LogLevelError>
Convert back from u8
to a LogLevel, if value is valid