pub(crate) fn init_tracing()Expand description
Initialize tracing to write to ~/.agentmux/logs/bashwrap-debug.log
at INFO by default. Writing to a file instead of stderr means:
- Diagnostics survive bash’s stdio capture — Claude’s tool_result
stderrfield is empty for successful commands, so anything we write to stderr is lost to us as developers. - We don’t pollute the model’s tool_result with bashwrap-internal noise (env snapshot, publish attempts, etc.).
- We can tail the file from outside the agentmux process tree.
Falls back to stderr at WARN level if the file can’t be opened.