Struct wasi_logger::Logger
source · pub struct Logger { /* private fields */ }
Expand description
Logger
which implements log::Log
and is backed by the
wasi:logging/logging
WIT interface.
Implementations§
source§impl Logger
impl Logger
sourcepub fn install() -> Result<&'static Self, SetLoggerError>
pub fn install() -> Result<&'static Self, SetLoggerError>
Sets the global logger to a Logger
using log::set_logger
and
returns the installed Logger
.
This function may only be called once in the lifetime of a program. Any
log events that occur before the call to log::set_logger
completes will be ignored.
§Errors
An error is returned if a logger has already been set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Logger
impl RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin 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