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.
()
| 892 | /// flag, so its position is unconstrained — scanning argv is both simpler and |
| 893 | /// more faithful than trying to parse twice. |
| 894 | fn verbose_requested() -> bool { |
| 895 | std::env::args_os().any(|a| a == "-v" || a == "--verbose") |
| 896 | } |
| 897 | |
| 898 | /// Install the logger, honouring `--verbose`. |
| 899 | /// |