setup_log_crate

Function setup_log_crate 

Source
pub fn setup_log_crate()
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 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_log_crate();
logforth_core::builder().apply()