pub struct LoggerBuilder { /* private fields */ }
Implementations§
Source§impl LoggerBuilder
impl LoggerBuilder
Sourcepub fn new() -> Self
👎Deprecated since 0.3.0: it may be removed in the future, use Logger::builder()
instead
pub fn new() -> Self
Logger::builder()
insteadConstructs a LoggerBuilder
.
Sourcepub fn name<S>(&mut self, name: S) -> &mut Self
pub fn name<S>(&mut self, name: S) -> &mut Self
Sets the name of the logger.
This parameter is optional.
§Requirements
A logger name should not contain any of these characters:
,
=
*
?
$
{
}
"
'
;
,
and cannot start or end with a whitespace.
Otherwise, LoggerBuilder::build
will return an error.
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 level filter.
This parameter is optional.
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.
This paramter is optional.
See the documentation of Logger::set_flush_level_filter
for the
description of this parameter.
Sourcepub fn error_handler(&mut self, handler: ErrorHandler) -> &mut Self
pub fn error_handler(&mut self, handler: ErrorHandler) -> &mut Self
Sets the error handler.
This parameter is optional.
See the documentation of Logger::set_error_handler
for the
description of this parameter.
Trait Implementations§
Source§impl Clone for LoggerBuilder
impl Clone for LoggerBuilder
Source§fn clone(&self) -> LoggerBuilder
fn clone(&self) -> LoggerBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for LoggerBuilder
impl !RefUnwindSafe for LoggerBuilder
impl Send for LoggerBuilder
impl Sync for LoggerBuilder
impl Unpin for LoggerBuilder
impl !UnwindSafe for LoggerBuilder
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