Struct slog_kickstarter::SlogKickstarter
source · [−]pub struct SlogKickstarter { /* private fields */ }
Expand description
the actual slog builder
Implementations
sourceimpl SlogKickstarter
impl SlogKickstarter
sourcepub fn new<S: Into<String>>(service_name: S) -> Self
pub fn new<S: Into<String>>(service_name: S) -> Self
initialize the log-builder with a name for your service
sourcepub fn with_debug_log_for(&mut self, module_name: &'static str) -> &mut Self
pub fn with_debug_log_for(&mut self, module_name: &'static str) -> &mut Self
enable debug-log for the given module. May be called multiple times to add debug logging for multiple modules
sourcepub fn with_default_level(&mut self, level: FilterLevel) -> &mut Self
pub fn with_default_level(&mut self, level: FilterLevel) -> &mut Self
set a default loglevel
sourcepub fn with_json_logging(&mut self) -> &mut Self
pub fn with_json_logging(&mut self) -> &mut Self
enforce JSON logging
this should typically be set via RUST_LOG_JSON=1
sourcepub fn without_json_logging(&mut self) -> &mut Self
pub fn without_json_logging(&mut self) -> &mut Self
enforce no JSON logging
this should typically be set via RUST_LOG_JSON=0
, or just leaving out RUST_LOG_JSON
,
as this is the default
sourcepub fn without_stdlog(&mut self) -> &mut Self
pub fn without_stdlog(&mut self) -> &mut Self
do not initialize stdlog, i.e. disable slog for logs from log
Auto Trait Implementations
impl RefUnwindSafe for SlogKickstarter
impl Send for SlogKickstarter
impl Sync for SlogKickstarter
impl Unpin for SlogKickstarter
impl UnwindSafe for SlogKickstarter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more