MCPcopy Create free account
hub / github.com/elastio/devx / log_cmd

Method log_cmd

devx-cmd/src/lib.rs:316–319  ·  view source on GitHub ↗

When set to some [`log::Level`] the command with its arguments and output will be logged via [`log`] crate. Note that this method is independent from [`Cmd::log_err()`]. Default: `Some(`[`log::Level::Debug`]`)`

(&mut self, level: impl Into<Option<log::Level>>)

Source from the content-addressed store, hash-verified

314 ///
315 /// Default: `Some(`[`log::Level::Debug`]`)`
316 pub fn log_cmd(&mut self, level: impl Into<Option<log::Level>>) -> &mut Self {
317 self.as_mut().log_cmd = level.into();
318 self
319 }
320
321 /// When set to some [`log::Level`] the invocation error will be logged.
322 /// Set it to [`None`] or [`log::Level::Trace`] if non-zero exit code is

Callers

nothing calls this directly

Calls 1

as_mutMethod · 0.80

Tested by

no test coverage detected