os-checker-plugin 0.1.4

a lib used in os-checker's plugins, containing common utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use tracing_subscriber::{fmt, prelude::*, registry, EnvFilter};

pub fn init() {
    let fmt_layer = fmt::layer();
    let env_layer = EnvFilter::from_default_env();
    let error_layer = tracing_error::ErrorLayer::default();

    if let Err(err) = registry()
        .with(fmt_layer)
        .with(env_layer)
        .with(error_layer)
        .try_init()
    {
        eprintln!("Logger already init: {err}");
    };

    color_eyre::install().unwrap();
}