Use layered tracing-subscriber registry
Switches from the chained fmt().with_env_filter().init() style to
the composable registry().with(fmt::layer()).with(EnvFilter) pattern.
Assisted-by: Claude Opus 4.6 via pi
diff --git a/src/bin/ranger/main.rs b/src/bin/ranger/main.rs
index 5de2d87..395abe1 100644
--- a/src/bin/ranger/main.rs
+++ b/src/bin/ranger/main.rs
@@ -3,6 +3,7 @@ mod output;
use clap::{Parser, Subcommand};
use std::path::PathBuf;
+use tracing_subscriber::{EnvFilter, fmt, prelude::*};
#[derive(Parser)]
#[command(name = "ranger", about = "Personal task tracker")]
@@ -53,8 +54,9 @@ fn resolve_db_path(cli_path: Option<PathBuf>) -> PathBuf {
#[tokio::main]
async fn main() -> color_eyre::Result<()> {
color_eyre::install()?;
- tracing_subscriber::fmt()
- .with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
+ tracing_subscriber::registry()
+ .with(fmt::layer())
+ .with(EnvFilter::from_default_env())
.init();
let cli = Cli::parse();