pub struct ConsoleLogger { /* private fields */ }
Expand description
Logger implementation that writes log records to the console.
This implementation of the Logger
trait writes log records (Record
) to the console using the provided
log::Level
. Log records with the Error
kind ignore the provided log::Level
and are always written
with log::Level::Error
.
Implementations§
Source§impl ConsoleLogger
impl ConsoleLogger
Sourcepub fn new(level: &str) -> Result<Self, ParseLevelError>
pub fn new(level: &str) -> Result<Self, ParseLevelError>
Construct a new instance of ConsoleLogger
using provided log level str
. Returns an Err
in
case if provided log level str
was incorrect.
Sourcepub fn new_unchecked(level: &str) -> Self
pub fn new_unchecked(level: &str) -> Self
Construct a new instance of ConsoleLogger
using provided log level str
. Panics in case if
provided log level str
was incorrect.
Trait Implementations§
Source§impl Clone for ConsoleLogger
impl Clone for ConsoleLogger
Source§fn clone(&self) -> ConsoleLogger
fn clone(&self) -> ConsoleLogger
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 moreSource§impl Debug for ConsoleLogger
impl Debug for ConsoleLogger
Auto Trait Implementations§
impl Freeze for ConsoleLogger
impl RefUnwindSafe for ConsoleLogger
impl Send for ConsoleLogger
impl Sync for ConsoleLogger
impl Unpin for ConsoleLogger
impl UnwindSafe for ConsoleLogger
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