pub struct ConsoleLogger { /* private fields */ }
Expand description
Logs messages to the Web browser’s console
Error and warning messages will be logged with console.error()
and console.warn()
, respectively.
All other messages will be logged with console.log()
.
Implementations§
Source§impl ConsoleLogger
impl ConsoleLogger
Sourcepub fn new(formatter: &'static RecordFormatter, log_level: Level) -> Self
pub fn new(formatter: &'static RecordFormatter, log_level: Level) -> Self
Constructs a new ConsoleLogger
The given function will be used to format the logged messages.
Sourcepub fn with_level(level: Level) -> Self
pub fn with_level(level: Level) -> Self
Constructs a ConsoleLogger
with the given maximum log level
A default log formatter will be used.
Trait Implementations§
Source§impl Default for ConsoleLogger
impl Default for ConsoleLogger
Source§impl Log for ConsoleLogger
impl Log 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