nonebot_rs 0.3.0

A Onebot SDK in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub use colored;
pub use tracing::{event, Level};

pub fn init(debug: bool, trace: Option<bool>) {
    if debug {
        std::env::set_var("RUST_LOG", "debug");
    } else {
        std::env::set_var("RUST_LOG", "info");
    }
    if let Some(b) = trace {
        if b {
            std::env::set_var("RUST_LOG", "trace");
        }
    }
    tracing_subscriber::fmt::init();
}