log to stderr, not stdout

This commit is contained in:
Scott Lamb
2023-08-03 15:48:19 -05:00
parent b9db9c11cc
commit 0f019b6fb3
2 changed files with 7 additions and 0 deletions

View File

@@ -118,6 +118,7 @@ pub fn install() {
Ok(s) if s == "systemd" => {
let sub = tracing_subscriber::registry().with(
tracing_subscriber::fmt::Layer::new()
.with_writer(std::io::stderr)
.with_ansi(false)
.event_format(FormatSystemd)
.with_filter(filter),
@@ -127,6 +128,7 @@ pub fn install() {
Ok(s) if s == "json" => {
let sub = tracing_subscriber::registry().with(
tracing_subscriber::fmt::Layer::new()
.with_writer(std::io::stderr)
.with_thread_names(true)
.json()
.with_filter(filter),
@@ -136,6 +138,7 @@ pub fn install() {
_ => {
let sub = tracing_subscriber::registry().with(
tracing_subscriber::fmt::Layer::new()
.with_writer(std::io::stderr)
.with_timer(ChronoTimer)
.with_thread_names(true)
.with_filter(filter),