[−][src]Struct fluence::sdk::logger::WasmLogger
The Wasm Logger.
This struct implements the Log
trait from the log
crate, which allows it to act as a
logger.
For initialization of WasmLogger as a default logger please see init()
and init_with_level()
Methods
impl WasmLogger
[src]
pub fn init_with_level(level: Level) -> Result<(), SetLoggerError>
[src]
Initializes the global logger with a [WasmLogger
] instance with
max_log_level
set to a specific log level.
if cfg!(target_arch = "wasm32") { logger::WasmLogger::init_with_level(log::Level::Error).unwrap(); } error!("This message will be logged."); info!("This message will not be logged.");
pub fn init() -> Result<(), SetLoggerError>
[src]
Initializes the global logger with a [WasmLogger
] instance with max_log_level
set to
Level::Info
.
if cfg!(target_arch = "wasm32") { fluence::logger::WasmLogger::init().unwrap(); } error!("This message will be logged."); trace!("This message will not be logged.");
Trait Implementations
impl Log for WasmLogger
[src]
Auto Trait Implementations
impl Send for WasmLogger
impl Sync for WasmLogger
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,