mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 06:44:27 +01:00
move logs to stderr
This commit is contained in:
parent
88c6165e20
commit
4148d391b8
@ -1,5 +1,5 @@
|
|||||||
use std::env;
|
use std::env;
|
||||||
use std::io::{stderr, Write};
|
use std::io::{stderr, LineWriter, Write};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
@ -31,6 +31,7 @@ fn default_log_route_layer() -> LogRouteType {
|
|||||||
|
|
||||||
fn default_log_stderr_layer(opt: &Opt) -> LogStderrType {
|
fn default_log_stderr_layer(opt: &Opt) -> LogStderrType {
|
||||||
let layer = tracing_subscriber::fmt::layer()
|
let layer = tracing_subscriber::fmt::layer()
|
||||||
|
.with_writer(|| LineWriter::new(std::io::stderr()))
|
||||||
.with_span_events(tracing_subscriber::fmt::format::FmtSpan::CLOSE);
|
.with_span_events(tracing_subscriber::fmt::format::FmtSpan::CLOSE);
|
||||||
|
|
||||||
let layer = match opt.experimental_logs_mode {
|
let layer = match opt.experimental_logs_mode {
|
||||||
|
Loading…
Reference in New Issue
Block a user