Function tracing_log::env_logger::try_init
source · pub fn try_init() -> Result<(), SetLoggerError>
👎Deprecated since 0.1.4: use
tracing-subscriber
’s fmt::Subscriber
insteadAvailable on crate feature
env_logger
only.Expand description
Attempts to initialize the global logger with an env logger configured to
emit tracing
events.
This should be called early in the execution of a Rust program. Any log events that occur before initialization will be ignored.
Errors
This function will fail if it is called more than once, or if another library has already initialized a global logger.