Skip to content

Commit

Permalink
chore: Switch console log to a more compact format
Browse files Browse the repository at this point in the history
This removes the default `span1{field=foo}:span2{field2=bar}:` prefix,
instead adding the span fields as logfmt compatible fields.

It also drops the target, in most cases `pyoci::service::log:`, from the
message.
  • Loading branch information
AllexVeldman committed Mar 3, 2025
1 parent 753c7ba commit 7bf90fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ fn setup_tracing(
cancel_token: CancellationToken,
) -> (impl Subscriber, Option<JoinHandle<()>>) {
// Setup tracing
let fmt_layer = tracing_subscriber::fmt::layer();
let fmt_layer = tracing_subscriber::fmt::layer()
.with_target(false)
.compact();

let el_reg = tracing_subscriber::registry()
.with(EnvFilter::new(&environ.rust_log))
Expand Down

0 comments on commit 7bf90fb

Please sign in to comment.