MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / verbose_requested

Function verbose_requested

atomic-cli/src/logging/mod.rs:184–186  ·  view source on GitHub ↗

Detect the global `--verbose` flag straight from `argv`. Logging has to be live before clap runs, because argument parsing itself can fail and we want the debug trail for that too. `--verbose` is a global flag, so its position is unconstrained — scanning argv is both simpler and more faithful than trying to parse twice.

()

Source from the content-addressed store, hash-verified

182/// flag, so its position is unconstrained — scanning argv is both simpler and
183/// more faithful than trying to parse twice.
184fn verbose_requested() -> bool {
185 std::env::args_os().any(|a| a == "-v" || a == "--verbose")
186}
187
188/// The terminal's filter: `RUST_LOG` wins, then `--verbose`, then warnings.
189/// Every command advertises `-v, --verbose`, and the debug lines that explain

Callers 1

terminal_layerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected