fix: prevent panic when tracing subscriber already initialized

Use try_init() instead of init() for tracing subscriber setup to
gracefully handle cases where a global subscriber is already set.

This fixes a panic in the scout agent subprocess when spawned by the
research tool, where a dependency may have already initialized tracing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Connor Justice
2026-01-14 15:33:22 -05:00
parent 03143ec7f8
commit 505225c0bd
2 changed files with 5 additions and 5 deletions

View File

@@ -169,8 +169,8 @@ pub fn initialize_logging(verbose: bool) {
.add_directive("llama=off".parse().unwrap())
};
tracing_subscriber::registry()
let _ = tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer())
.with(filter)
.init();
.try_init();
}