Expand description
Process-local tracing subscriber (binary path only; libraries only emit). Process-local tracing setup for the ssh-cli binary path.
§Product identity (Rules Rust — logs / tracing / rotation)
ssh-cli is a one-shot agent CLI, not a long-lived server:
| Signal | Policy |
|---|---|
| Facade | tracing only (no println! / env_logger / dual log consumer) |
| Sink | stderr text (data JSON stays on stdout) |
| Default filter | error (agent-first quiet stderr) |
| Override | CLI only: -v → debug; ambient RUST_LOG is ignored; -q does not change the filter |
| Reload | reload::Layer so bootstrap (pre-parse) can reconfigure after argv |
| Bridge | tracing-log::LogTracer for deps that emit via the log crate (russh, keyring) |
| Errors | tracing_error::ErrorLayer for SpanTrace capture |
§Explicitly out of scope
- OpenTelemetry / OTLP / metrics backends (product: zero telemetry)
tracing-appenderfile rotation +WorkerGuard(no local log files; short process)- Admin HTTP
/admin/log-level(no daemon / no network control plane) tokio-console/ Chrome tracing / journald / Docker log drivers as product features- Encrypted log-at-rest (no log files written by this binary)
Libraries that depend on ssh_cli as a crate should not call these
installers; only the binary entry (run → bootstrap_logs) installs the
global subscriber. Product modules only emit events/spans.
§Lifecycle
- [
bootstrap_logs] — before clap parse (phase 1b). - [
initialize_logs] — after parse, reloadsEnvFilterfrom-vonly (G-E2E-09). - Process exit —
mainflushes stderr; no file worker to join.
Functions§
- bootstrap_
logs - Installs stderr tracing before clap parse (one-shot lifecycle phase 1b).
- build_
env_ filter - Builds the process-local tracing filter from CLI
--verboseonly (G-AUD-22). - has_
reload_ handle - Returns whether the process owns a reloadable global filter (binary path).
- initialize_
logs - Initializes or reloads
tracing-subscriberfrom the verbose CLI flag.