From 4148d391b86f071f666f2b527348ffb360663d7b Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 15 Feb 2024 14:25:25 +0100 Subject: [PATCH] move logs to stderr --- meilisearch/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meilisearch/src/main.rs b/meilisearch/src/main.rs index 231b1cc75..f1f93dd99 100644 --- a/meilisearch/src/main.rs +++ b/meilisearch/src/main.rs @@ -1,5 +1,5 @@ use std::env; -use std::io::{stderr, Write}; +use std::io::{stderr, LineWriter, Write}; use std::path::PathBuf; use std::str::FromStr; use std::sync::Arc; @@ -31,6 +31,7 @@ fn default_log_route_layer() -> LogRouteType { fn default_log_stderr_layer(opt: &Opt) -> LogStderrType { let layer = tracing_subscriber::fmt::layer() + .with_writer(|| LineWriter::new(std::io::stderr())) .with_span_events(tracing_subscriber::fmt::format::FmtSpan::CLOSE); let layer = match opt.experimental_logs_mode {