sdivi-cli 0.2.13

Command-line interface for the Structural Divergence Indexer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use tracing_subscriber::{fmt, EnvFilter};

/// Initialise the `tracing` subscriber that writes structured logs to stderr.
///
/// Log level is read from `SDIVI_LOG_LEVEL` (default: `warn`).
pub fn init() {
    let filter =
        EnvFilter::try_from_env("SDIVI_LOG_LEVEL").unwrap_or_else(|_| EnvFilter::new("warn"));

    fmt()
        .with_env_filter(filter)
        .with_writer(std::io::stderr)
        .init();
}