Struct slog_redis::Logger [−][src]
pub struct Logger { /* fields omitted */ }
A logger that sends JSON formatted logs to a list in a Redis instance. It uses this format
{
"@timestamp": ${timeRFC3339},
"@source_host": ${hostname},
"@message": ${message},
"@fields": {
"level": ${levelLowercase},
"application": ${appName}
... // logged field 1
... // logged field 2
...
}
It supports structured logging via slog
. You can use the Builder
to
construct it and then use it as an slog drain.
Trait Implementations
impl Drain for Logger
[src]
impl Drain for Logger
[src]type Ok = ()
Type returned by this drain Read more
type Err = Error
Type of potential errors that can be returned by this Drain
fn log(
&self,
record: &Record<'_>,
values: &OwnedKVList
) -> Result<Self::Ok, Self::Err>
[src]
&self,
record: &Record<'_>,
values: &OwnedKVList
) -> Result<Self::Ok, Self::Err>
pub fn is_enabled(&self, level: Level) -> bool
[src]
pub fn is_critical_enabled(&self) -> bool
[src]
pub fn is_error_enabled(&self) -> bool
[src]
pub fn is_warning_enabled(&self) -> bool
[src]
pub fn is_info_enabled(&self) -> bool
[src]
pub fn is_debug_enabled(&self) -> bool
[src]
pub fn is_trace_enabled(&self) -> bool
[src]
pub fn map<F, R>(self, f: F) -> R where
F: FnOnce(Self) -> R,
[src]
F: FnOnce(Self) -> R,
pub fn filter<F>(self, f: F) -> Filter<Self, F> where
F: FilterFn,
[src]
F: FilterFn,
pub fn filter_level(self, level: Level) -> LevelFilter<Self>
[src]
pub fn map_err<F, E>(self, f: F) -> MapError<Self, E> where
F: MapErrFn<Self::Err, E>,
[src]
F: MapErrFn<Self::Err, E>,
pub fn ignore_res(self) -> IgnoreResult<Self>
[src]
pub fn fuse(self) -> Fuse<Self> where
Self::Err: Debug,
[src]
Self::Err: Debug,
Auto Trait Implementations
impl !RefUnwindSafe for Logger
impl !RefUnwindSafe for Logger
impl !UnwindSafe for Logger
impl !UnwindSafe for Logger