setup

Function setup 

Source
pub fn setup()
Expand description

Set up the log crate global logger.

This function calls log::set_logger to set up a LogCrateProxy and all logs from log crate will be forwarded to logforth’s default logger.

This should be called early in the execution of a Rust program. Any log events that occur before initialization will be ignored.

This function will panic if it is called more than once, or if another library has already initialized the log crate global logger.

This function will set the global maximum log level to Trace. To override this, call log::set_max_level after this function.

§Panics

Panic if the log crate global logger has already been set.

§Examples

logforth_bridge_log::setup();
logforth_core::builder().apply()