Skip to main content

build_env_filter

Function build_env_filter 

Source
pub fn build_env_filter(verbose: u8) -> EnvFilter
Expand description

Builds the process-local tracing filter from CLI -v count only (G-AUD-22 / G14).

levelfilter
0error
1 (-v)warn,ssh_cli=info
2 (-vv)warn,ssh_cli=debug
≥3 (-vvv)warn,ssh_cli=trace

Ambient RUST_LOG is ignored (not an env store of product config). --quiet affects human stdout only (crate::output::set_quiet).

G2 security: never emit a bare global debug/trace directive — that enables russh::client::encrypted, which logs the raw userauth packet (SSH password in cleartext) to stderr.