Log the outcome. The span closes when `self` drops here, logging how long the command took. URLs in the error lose their credentials.
(self, error: Option<&CliError>)
| 136 | /// Log the outcome. The span closes when `self` drops here, logging how |
| 137 | /// long the command took. URLs in the error lose their credentials. |
| 138 | pub(crate) fn finish(self, error: Option<&CliError>) { |
| 139 | match error { |
| 140 | None => tracing::info!(target: COMMAND_TARGET, outcome = %"ok", "command finished"), |
| 141 | Some(error) => tracing::info!( |
| 142 | target: COMMAND_TARGET, |
| 143 | outcome = %"error", |
| 144 | exit_code = error.exit_code(), |
| 145 | error = %redact::urls(&error.to_string()), |
| 146 | "command finished" |
| 147 | ), |
| 148 | } |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | /// How a message was printed for the user. |
no outgoing calls