#[non_exhaustive]#[repr(u32)]pub enum LogLevel {
Trace = 0,
Debug = 1,
Info = 2,
Warn = 3,
Error = 4,
Off = 8,
Audit = 5,
Open = 6,
Close = 7,
}
Expand description
Levels for logging
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Trace = 0
Tracing (very low priority or verbose logging)
Debug = 1
Debugging (low priority logging)
Info = 2
Informational logging
Warn = 3
Warnings
Error = 4
Errors
Off = 8
Logging level used to disable logging of severity-based logging levels. Anything logged at this level will be ignored.
Audit = 5
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 = 6
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 = 7
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
Source§type Err = LogLevelError
type Err = LogLevelError
Source§impl Ord for LogLevel
impl Ord for LogLevel
Source§impl PartialOrd for LogLevel
impl PartialOrd for LogLevel
Source§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