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

Function printed

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

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)

Source from the content-addressed store, hash-verified

162/// level it was printed at, so `ATOMIC_LOG=warn` keeps the warnings and
163/// errors. URLs lose their credentials first.
164pub(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///

Callers 4

print_successFunction · 0.85
print_errorFunction · 0.85
print_warningFunction · 0.85
print_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected