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

Method finish

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

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>)

Source from the content-addressed store, hash-verified

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.

Callers 15

mainFunction · 0.45
test_create_spinnerFunction · 0.45
test_create_progress_barFunction · 0.45
test_set_messageFunction · 0.45
test_is_finishedFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_create_spinnerFunction · 0.36
test_create_progress_barFunction · 0.36
test_set_messageFunction · 0.36
test_is_finishedFunction · 0.36