Struct spdlog::sink::JournaldSink
source · pub struct JournaldSink { /* private fields */ }
Available on Linux and crate feature
native
and crate feature libsystemd
only.Expand description
A sink with systemd-journal as the target.
§Log Level Mapping
spdlog-rs | journald |
---|---|
Critical | crit |
Error | err |
Warn | warning |
Info | info |
Debug | debug |
Trace | debug |
§Note
It requires an additional system dependency libsystemd
.
§Install on Ubuntu / Debian
apt install libsystemd-dev
§Install on ArchLinux
pacman -S systemd
Implementations§
source§impl JournaldSink
impl JournaldSink
sourcepub fn builder() -> JournaldSinkBuilder
pub fn builder() -> JournaldSinkBuilder
Constructs a builder of JournaldSink
.
Trait Implementations§
source§impl Sink for JournaldSink
impl Sink for JournaldSink
source§fn level_filter(&self) -> LevelFilter
fn level_filter(&self) -> LevelFilter
Gets the log level filter.
source§fn set_level_filter(&self, level_filter: LevelFilter)
fn set_level_filter(&self, level_filter: LevelFilter)
Sets the log level filter.
source§fn set_formatter(&self, formatter: Box<dyn Formatter>)
fn set_formatter(&self, formatter: Box<dyn Formatter>)
Sets the formatter.
source§fn set_error_handler(&self, handler: Option<ErrorHandler>)
fn set_error_handler(&self, handler: Option<ErrorHandler>)
Sets a error handler. Read more
source§fn should_log(&self, level: Level) -> bool
fn should_log(&self, level: Level) -> bool
Determines if a log message with the specified level would be logged.
Auto Trait Implementations§
impl !RefUnwindSafe for JournaldSink
impl Send for JournaldSink
impl Sync for JournaldSink
impl Unpin for JournaldSink
impl !UnwindSafe for JournaldSink
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more