From 66c88fb48ec996135a074d199989814223a6afc3 Mon Sep 17 00:00:00 2001 From: funman300 Date: Wed, 12 Aug 2026 20:36:12 +0000 Subject: [PATCH] fix(cli): route tracing diagnostics to stderr Machine output (the import/seed-dev subcommands' JSON result) now owns stdout; tracing logs go to stderr. Lets a caller parse the import outcome without log-line contamination on stdout. No behavioral change to the server beyond where its logs are written. --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index fde2715..63cae9c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,9 @@ async fn main() -> Result<()> { EnvFilter::try_from_default_env() .unwrap_or_else(|_| "openfut_core=debug,tower_http=debug".into()), ) - .with(tracing_subscriber::fmt::layer()) + // Diagnostics on stderr so stdout carries only machine output (the + // `import`/`seed-dev` subcommands print a clean JSON result there). + .with(tracing_subscriber::fmt::layer().with_writer(std::io::stderr)) .init(); let cfg = config::Config::from_env()?;