mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 10:07:40 +08:00
Merge #4418
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>
This commit is contained in:
commit
5ee6aaddc4
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user