Improve settings #168
1 changed files with 3 additions and 3 deletions
Use stderr for logging
commit
4f477cffa0
|
|
@ -92,9 +92,9 @@ fn set_up_logging(
|
||||||
.with_line_number(is_debug_mode)
|
.with_line_number(is_debug_mode)
|
||||||
.compact();
|
.compact();
|
||||||
|
|
||||||
let stdout_layer = tracing_subscriber::fmt::layer()
|
let stderr_layer = tracing_subscriber::fmt::layer()
|
||||||
.with_ansi(use_colors)
|
.with_ansi(use_colors)
|
||||||
.with_writer(std::io::stdout)
|
.with_writer(std::io::stderr)
|
||||||
.event_format(format.clone());
|
.event_format(format.clone());
|
||||||
|
|
||||||
let file_layer = tracing_subscriber::fmt::layer()
|
let file_layer = tracing_subscriber::fmt::layer()
|
||||||
|
|
@ -104,7 +104,7 @@ fn set_up_logging(
|
||||||
|
|
||||||
tracing_subscriber::registry()
|
tracing_subscriber::registry()
|
||||||
.with(env_filter)
|
.with(env_filter)
|
||||||
.with(stdout_layer)
|
.with(stderr_layer)
|
||||||
.with(file_layer)
|
.with(file_layer)
|
||||||
.try_init()
|
.try_init()
|
||||||
.context("Failed to initialise tracing")
|
.context("Failed to initialise tracing")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue