Skip to content

Commit f8d0bc2

Browse files
committed
tracing: Log to stderr, and drop timestamps
This matches bootc's setup (without the journal integration for now as we don't strictly need it). But specifically this fixes setting `RUST_LOG` and having that break the monitor-status JSON stream: bootc-dev#86 (comment) Signed-off-by: Colin Walters <[email protected]>
1 parent 4c385b8 commit f8d0bc2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

crates/kit/src/main.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,14 @@ fn install_tracing() {
154154
use tracing_subscriber::prelude::*;
155155
use tracing_subscriber::EnvFilter;
156156

157-
let fmt_layer = fmt::layer().with_target(false).with_writer(std::io::stderr);
157+
let format = fmt::format()
158+
.without_time()
159+
.with_target(false)
160+
.compact();
161+
162+
let fmt_layer = fmt::layer()
163+
.event_format(format)
164+
.with_writer(std::io::stderr);
158165
let filter_layer = EnvFilter::try_from_default_env()
159166
.or_else(|_| EnvFilter::try_new("info"))
160167
.unwrap();

0 commit comments

Comments
 (0)