Skip to main content

Module tracing_init

Module tracing_init 

Source
Expand description

Stderr-only tracing subscriber for the helper-protocol binaries.

The remote-helper binaries speak the git transport protocol on stdout — see .claude/rules/protocol-stdout.md — so every log line MUST go to stderr. The subscriber returned here is wired with std::io::stderr as its writer; the EnvFilter is wrapped in a reload::Layer so the protocol REPL can raise the level to info at runtime in response to option verbosity 2+. The reload is one-way — there is no path that lowers the level once raised.

Startup level is error, with one env-var override honoured:

  • GIT_REMOTE_OBJECT_STORE_VERBOSE — canonical name for this crate.

A numeric value >= 2 bumps the start level to info, matching the option verbosity 2 threshold from the helper protocol.

Structs§

InitError
Errors surfaced by init / raise_to_info. Boxed so the public surface does not leak tracing-subscriber’s error types.

Constants§

ENV_VERBOSE
Canonical env var read at startup to bump the verbosity floor.

Functions§

init
Initialise the global subscriber and return a handle to its filter.
raise_to_info
Raise the subscriber to info level. One-way: there is no inverse that lowers the level. Called by option verbosity 2+.

Type Aliases§

ReloadHandle
Handle returned by init so callers can flip the subscriber’s filter at runtime. The underlying layer type is intentionally hidden behind a type alias to keep the public surface minimal.