Struct spdlog::prelude::LoggerBuilder
source · [−]pub struct LoggerBuilder { /* private fields */ }Expand description
The builder of Logger.
Implementations
sourceimpl LoggerBuilder
impl LoggerBuilder
sourcepub fn name<S>(&mut self, name: S) -> &mut Self where
S: Into<String>,
pub fn name<S>(&mut self, name: S) -> &mut Self where
S: Into<String>,
Sets the name of the logger.
A literal constant string is usually set.
Panics
A logger name should not contain any of these characters:
, = * ? $ { } " ' ;,
and cannot start or end with a whitespace.
sourcepub fn level_filter(&mut self, level_filter: LevelFilter) -> &mut Self
pub fn level_filter(&mut self, level_filter: LevelFilter) -> &mut Self
Sets the log filter level.
sourcepub fn sinks<I>(&mut self, sinks: I) -> &mut Self where
I: IntoIterator<Item = Arc<dyn Sink>>,
pub fn sinks<I>(&mut self, sinks: I) -> &mut Self where
I: IntoIterator<Item = Arc<dyn Sink>>,
Add multiple Sinks.
sourcepub fn flush_level_filter(&mut self, level_filter: LevelFilter) -> &mut Self
pub fn flush_level_filter(&mut self, level_filter: LevelFilter) -> &mut Self
Sets the flush level filter.
sourcepub fn error_handler(&mut self, handler: ErrorHandler) -> &mut Self
pub fn error_handler(&mut self, handler: ErrorHandler) -> &mut Self
Sets the error handler.
Trait Implementations
sourceimpl Clone for LoggerBuilder
impl Clone for LoggerBuilder
sourcefn clone(&self) -> LoggerBuilder
fn clone(&self) -> LoggerBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl !RefUnwindSafe for LoggerBuilder
impl Send for LoggerBuilder
impl Sync for LoggerBuilder
impl Unpin for LoggerBuilder
impl !UnwindSafe for LoggerBuilder
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more