diff --git a/Cargo.toml b/Cargo.toml index 2cc8591..b1b13bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ch-grafana-cache" -version = "0.1.5" +version = "0.1.6" edition = "2021" [dependencies] @@ -22,4 +22,4 @@ serde_yaml = "0.9.34" thiserror = "1.0.61" tokio = { version = "1.38.0", features = ["full"] } tracing = "0.1.40" -tracing-subscriber = { version = "0.3.18", features = ["json"] } +tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] } diff --git a/src/main.rs b/src/main.rs index 3e0adcc..3172be2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -111,7 +111,9 @@ fn print_sql(sql: &str, theme: Option<&String>) -> anyhow::Result<()> { async fn main_impl() -> anyhow::Result<()> { let args = Flags::parse(); - let fmt = tracing_subscriber::fmt().with_writer(std::io::stderr); + let fmt = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .with_writer(std::io::stderr); if args.log_json { fmt.json().init(); } else {