/// Start simple logger. Panics on error.
Start simple logger. Panics on error.
Start simple logger . Panics on error .
pub fn init_simple_logs(log_verbose_count: u8) -> Result<TracingGuard, SetGlobalDefaultError> {
    let log_layer_filter = match log_verbose_count {
        0 => EnvFilter::try_new("warn").unwrap(),
        1 => EnvFilter::try_new("info").unwrap(),
        2 => EnvFilter::try_new("debug,hyper::proto::h1=info,h2=info").unwrap(),
        _ => EnvFilter::try_new("trace,hyper::proto::h1=info,h2=info").unwrap(),
    };
    let subscriber = tracing_subscriber::Registry::default()
        .with(log_layer_filter)
        .with(fmt::layer());
    tracing::subscriber::set_global_default(subscriber)?;
    Ok(TracingGuard)
}
pub fn init_simple_logs ( log_verbose_count : u8 ) -> Result < TracingGuard , SetGlobalDefaultError > { let log_layer_filter = match log_verbose_count { 0 => EnvFilter :: try_new ( " " ) . unwrap ( ) , 1 => EnvFilter :: try_new ( " " ) . unwrap ( ) , 2 => EnvFilter :: try_new ( " " ) . unwrap ( ) , _ => EnvFilter :: try_new ( " " ) . unwrap ( ) , } ; let subscriber = tracing_subscriber :: Registry :: default ( ) . with ( log_layer_filter ) . with ( fmt :: layer ( ) ) ; tracing :: subscriber :: set_global_default ( subscriber ) ? ; Ok ( TracingGuard ) }
Start simple logger.
Start simple logger .
log_verbose_count
u8