detect tracing_subscriber by RUST_LOG environment var

This commit is contained in:
yggverse 2025-07-09 15:52:58 +03:00
parent 4f684e4bf4
commit 68e7760b98

View file

@ -31,7 +31,7 @@ async fn main() -> Result<()> {
// init components
let time_init = Local::now();
let config = Config::parse();
if config.debug {
if std::env::var("RUST_LOG").is_ok() {
tracing_subscriber::fmt::init()
}
let peers = Peers::init(&config.initial_peer)?;