Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

chore(tui): include tracing targets in file logs (#8418)

Josh McKinneyf6275a51429c
diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs
index 5f34c6f62f..bce9a350f4 100644
--- a/codex-rs/tui/src/lib.rs
+++ b/codex-rs/tui/src/lib.rs
@@ -273,7 +273,10 @@ pub async fn run_main(
let file_layer = tracing_subscriber::fmt::layer()
.with_writer(non_blocking)
- .with_target(false)
+ // `with_target(true)` is the default, but we previously disabled it for file output.
+ // Keep it enabled so we can selectively enable targets via `RUST_LOG=...` and then
+ // grep for a specific module/target while troubleshooting.
+ .with_target(true)
.with_ansi(false)
.with_span_events(tracing_subscriber::fmt::format::FmtSpan::FULL)
.with_filter(env_filter());
diff --git a/codex-rs/tui2/src/lib.rs b/codex-rs/tui2/src/lib.rs
index ce4f6d7b60..0e3c805fbb 100644
--- a/codex-rs/tui2/src/lib.rs
+++ b/codex-rs/tui2/src/lib.rs
@@ -279,7 +279,10 @@ pub async fn run_main(
let file_layer = tracing_subscriber::fmt::layer()
.with_writer(non_blocking)
- .with_target(false)
+ // `with_target(true)` is the default, but we previously disabled it for file output.
+ // Keep it enabled so we can selectively enable targets via `RUST_LOG=...` and then
+ // grep for a specific module/target while troubleshooting.
+ .with_target(true)
.with_ansi(false)
.with_span_events(tracing_subscriber::fmt::format::FmtSpan::CLOSE)
.with_filter(env_filter());