Skip to content

Commit

Permalink
Merge #4418
Browse files Browse the repository at this point in the history
4418: Output logs to stderr r=dureuill a=irevoire

Output the logs to `stderr` instead of `stdout`. This was introduced in the `v1.7.0-rc.0` and is a bug; logs should always be outputted to stderr.

Fix #4419

Co-authored-by: Tamo <tamo@meilisearch.com>
  • Loading branch information
meili-bors[bot] and irevoire committed Feb 15, 2024
2 parents 88c6165 + 4148d39 commit 5ee6aad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 5ee6aad

Please sign in to comment.