pub struct LoggerBuilder { /* private fields */ }
Available on crate feature
logger
only.Implementations§
Source§impl LoggerBuilder
impl LoggerBuilder
Sourcepub fn fmt_level(level: &Level) -> String
pub fn fmt_level(level: &Level) -> String
Return colored string of level
.
- TRACE/DEBUG => Magenta
- INFO => Green
- WARN => Yellow
- ERROR => Red
pub fn new() -> Self
pub fn json_writer(self, writer: WriterFn) -> Self
pub fn color_writer(self, writer: WriterFn) -> Self
pub fn json(self) -> Self
pub fn level(self, level: Level) -> Self
pub fn filename(self) -> Self
pub fn line_number(self) -> Self
pub fn handler<F>(self, handler: F) -> Self
pub fn filter<F>(self, filter: F) -> Self
pub fn transformer<F>(self, transformer: F) -> Self
Sourcepub fn start(self) -> (Logger, LoggerGuard)
pub fn start(self) -> (Logger, LoggerGuard)
Start logger. This method will spawn a new thread to print the log.
Auto 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