SIGN IN SIGN UP

feat(daemon): install a subscriber, so the daemon's 97 emits reach somewhere

`tracing` is the emitting half and this daemon already used it in 97 places
across eight crates. `tracing_subscriber` is the receiving half. With none
installed the macros are not buffered records — they are no-ops that do not
even evaluate their arguments, so a full boot and serve produced exactly one
line of output: the banner, which is `println!` and never went through
`tracing` at all. Every gate refusal, money line and lease decision this
milestone added was written to nowhere, and the logging audit passed the whole
time because it checks call SHAPE, not that anything is listening.

The stock formatter, deliberately. Logs, metrics and traces will leave this
process through an OTLP collector bound for Elastic and Grafana, so the wire
format is the collector's business; a hand-written one here would be a second
format maintained for no reader. Every emit already carries the structured
`event` and `error_code` fields that collector will read, so it plugs in as a
layer rather than as a call-site sweep.

Three choices, and nothing else:

- stderr, because stdout is already spoken for — the banner and every
  subcommand's answer are a program interface, and interleaving records into
  them would corrupt both.
- ANSI only on a terminal, through the `Rendering` this crate already has;
  `fmt()` does not detect that on its own and escapes in journald are noise.
- `AGENTSFLEET_LOG_LEVEL` for the level, parsed by `LevelFilter`'s own
  `FromStr` — an unreadable value falls back to `info` rather than refusing,
  because a typo in a debugging aid must not stop a daemon booting. Spelled in
  full rather than as a bare `AGENTSFLEET_LOG` so the name says which knob it
  is in a deployment manifest.

Proven on the live daemon against compose, not only in a test: boot went from
1 line to 5 at the default level, including `router_built mounted=5 tabled=81`
and both pool initialisations, and `AGENTSFLEET_LOG_LEVEL=debug` raises it to
11 with every mounted route naming its own template.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
K
Kishore Kumar committed
3818d49678031acae52d1e9985b3c3d27dbe5f3d
Parent: 20e36e9