pub fn init() -> Result<Handle, Error> {
    let (dispatch, handle) = match Settings::from_env() {
        Some(s) => s.build(),
        None => return Ok(Handle(None)),
    };

    // Set the default subscriber.
    tracing::dispatcher::set_global_default(dispatch)?;

    // Set up log compatibility.
    init_log_compat()?;

    Ok(handle)
}
/// Initialize tracing and logging with the value of the `ENV_LOG`
/// environment variable as the verbosity-level filter.
Initialize tracing and logging with the value of the `ENV_LOG`
environment variable as the verbosity-level filter.
Initialize tracing and logging with the value of the ` ENV_LOG ` environment variable as the verbosity - level filter .
pub fn init() -> Result<Handle, Error> {
    let (dispatch, handle) = match Settings::from_env() {
        Some(s) => s.build(),
        None => return Ok(Handle(None)),
    };
    // Set the default subscriber.
    tracing::dispatcher::set_global_default(dispatch)?;
    // Set up log compatibility.
    init_log_compat()?;
    Ok(handle)
}
pub fn init ( ) -> Result < Handle , Error > { let ( dispatch , handle ) = match Settings :: from_env ( ) { Some ( s ) => s . build ( ) , None => return Ok ( Handle ( None ) ) , } ; // Set the default subscriber. tracing :: dispatcher :: set_global_default ( dispatch ) ? ; // Set up log compatibility. init_log_compat ( ) ? ; Ok ( handle ) }
Initialize tracing and logging with the value of the `ENV_LOG`
environment variable as the verbosity-level filter.
Initialize tracing and logging with the value of the ` ENV_LOG ` environment variable as the verbosity - level filter .