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.
This commit is contained in:
+3
-1
@@ -12,7 +12,9 @@ async fn main() -> Result<()> {
|
|||||||
EnvFilter::try_from_default_env()
|
EnvFilter::try_from_default_env()
|
||||||
.unwrap_or_else(|_| "openfut_core=debug,tower_http=debug".into()),
|
.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();
|
.init();
|
||||||
|
|
||||||
let cfg = config::Config::from_env()?;
|
let cfg = config::Config::from_env()?;
|
||||||
|
|||||||
Reference in New Issue
Block a user