pub struct Logger { /* private fields */ }Expand description
Main logger implementation
Implementations§
Source§impl Logger
impl Logger
pub fn new(config: LoggerConfig) -> Self
pub fn with_formatter(self, formatter: Arc<dyn LogFormatter>) -> Self
pub fn add_output(&self, output: Box<dyn LogOutput>)
pub fn log(&self, entry: LogEntry)
pub fn flush(&self)
pub fn set_level(&self, level: LogLevel)
pub fn set_module_level(&self, module: String, level: LogLevel)
pub fn stats(&self) -> LogStats
pub fn clear_stats(&self)
Auto Trait Implementations§
impl Freeze for Logger
impl !RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnsafeUnpin for Logger
impl !UnwindSafe for Logger
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more