graphina 0.3.0-alpha.4

A graph data science library for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use ctor::ctor;
use tracing::Level;

#[ctor]
fn set_debug_level() {
    // If DEBUG_GRAPHINA is not set or set to false, disable logging. Otherwise, enable logging
    if std::env::var("DEBUG_GRAPHINA").map_or(true, |v| v == "0" || v == "false" || v.is_empty()) {
        // Disable logging
    } else {
        tracing_subscriber::fmt()
            .with_max_level(Level::DEBUG)
            .init();
    }
}