Copy a message the CLI printed for the user into the log file, at the level it was printed at, so `ATOMIC_LOG=warn` keeps the warnings and errors. URLs lose their credentials first.
(kind: Printed, message: &str)
| 162 | /// level it was printed at, so `ATOMIC_LOG=warn` keeps the warnings and |
| 163 | /// errors. URLs lose their credentials first. |
| 164 | pub(crate) fn printed(kind: Printed, message: &str) { |
| 165 | match kind { |
| 166 | Printed::Error => { |
| 167 | tracing::error!(target: PRINTED_TARGET, ?kind, "{}", redact::urls(message)) |
| 168 | } |
| 169 | Printed::Warning => { |
| 170 | tracing::warn!(target: PRINTED_TARGET, ?kind, "{}", redact::urls(message)) |
| 171 | } |
| 172 | Printed::Success | Printed::Info => { |
| 173 | tracing::info!(target: PRINTED_TARGET, ?kind, "{}", redact::urls(message)) |
| 174 | } |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | /// Detect the global `--verbose` flag straight from `argv`. |
| 179 | /// |
no outgoing calls
no test coverage detected