docs(spec): drop the unnecessary MakeWriter newtype
tracing-subscriber already impls MakeWriter for Mutex<W: io::Write> and Arc<W>, so Arc<Mutex<RotatingLogWriter>> satisfies with_writer directly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EGntTHCW3sEPy1VBRopNNp
This commit is contained in:
@@ -154,8 +154,11 @@ which is too late to open a log file for the logger itself.
|
|||||||
For the `Cmd::Daemon` arm only, the subscriber writes to `stderr.and(file)` via
|
For the `Cmd::Daemon` arm only, the subscriber writes to `stderr.and(file)` via
|
||||||
`MakeWriterExt`, where the file half is `log_dir/xy.log` backed by the existing
|
`MakeWriterExt`, where the file half is `log_dir/xy.log` backed by the existing
|
||||||
`xy_supervisor::logs::RotatingLogWriter` (10 MB × 5, the same rotation used for
|
`xy_supervisor::logs::RotatingLogWriter` (10 MB × 5, the same rotation used for
|
||||||
per-server logs). A small `MakeWriter` newtype wrapping
|
per-server logs). No adapter type is needed: `tracing-subscriber` 0.3 already
|
||||||
`Arc<Mutex<RotatingLogWriter>>` bridges the two.
|
implements `MakeWriter` for `Mutex<W> where W: io::Write` (`fmt/writer.rs:808`)
|
||||||
|
and for `Arc<W> where W: MakeWriter` (`fmt/writer.rs:694`), so
|
||||||
|
`Arc<Mutex<RotatingLogWriter>>` satisfies the bound once Task 1 lands the
|
||||||
|
`io::Write` impl.
|
||||||
|
|
||||||
Every other subcommand keeps stderr-only logging; CLI output does not belong in
|
Every other subcommand keeps stderr-only logging; CLI output does not belong in
|
||||||
the daemon's log.
|
the daemon's log.
|
||||||
|
|||||||
Reference in New Issue
Block a user