Skip to content

Commit fececfa

Browse files
committed
fix: update tracing subscriber to write JSON output to stderr
1 parent d9fc8f7 commit fececfa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/pet/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ pub fn initialize_tracing(verbose: bool) {
4747
if use_json {
4848
tracing_subscriber::registry()
4949
.with(filter)
50-
.with(fmt::layer().json())
50+
.with(fmt::layer().json().with_writer(std::io::stderr))
5151
.init();
5252
} else {
5353
tracing_subscriber::registry()
5454
.with(filter)
5555
.with(
5656
fmt::layer()
5757
.with_target(true)
58-
.with_timer(fmt::time::uptime()),
58+
.with_timer(fmt::time::uptime())
59+
.with_writer(std::io::stderr),
5960
)
6061
.init();
6162
}

0 commit comments

Comments
 (0)