The terminal's filter: `RUST_LOG` wins, then `--verbose`, then warnings. Every command advertises `-v, --verbose`, and the debug lines that explain which identity a request authenticated as are only reachable through it. Like `env_logger`, a `RUST_LOG` with no usable directive shows errors rather than nothing.
(rust_log: Option<String>, verbose: bool)
| 191 | /// Like `env_logger`, a `RUST_LOG` with no usable directive shows errors |
| 192 | /// rather than nothing. |
| 193 | fn terminal_directives(rust_log: Option<String>, verbose: bool) -> String { |
| 194 | let directives = match rust_log.filter(|value| !value.trim().is_empty()) { |
| 195 | Some(value) if parses(&value) => value, |
| 196 | Some(_) => "error".to_string(), |
| 197 | None if verbose => { |
| 198 | format!("{VERBOSE_FILTER},{FILE_ONLY_TARGETS},{TRACING_NATIVE_DEPENDENCIES}") |
| 199 | } |
| 200 | None => format!("{TERMINAL_FILTER},{TRACING_NATIVE_DEPENDENCIES}"), |
| 201 | }; |
| 202 | format!("{directives},{PANIC_TARGET}=off,{PRINTED_TARGET}=off") |
| 203 | } |
| 204 | |
| 205 | fn parses(directives: &str) -> bool { |
| 206 | directives |
no test coverage detected