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