diff --git a/src/native_mux_impl/command.rs b/src/native_mux_impl/command.rs index 96dcbd90e..2122ea7e2 100644 --- a/src/native_mux_impl/command.rs +++ b/src/native_mux_impl/command.rs @@ -73,6 +73,9 @@ impl Command { let cmd = NonZeroByteSlice::new(&self.cmd).ok_or(Error::InvalidCommand)?; + #[cfg(feature = "tracing")] + tracing::debug!(cmd = String::from_utf8_lossy(cmd.into_inner()).as_ref()); + let session = Session::builder() .cmd(Cow::Borrowed(cmd)) .subsystem(self.subsystem) diff --git a/src/process_impl/command.rs b/src/process_impl/command.rs index 56b41076b..fb1e42914 100644 --- a/src/process_impl/command.rs +++ b/src/process_impl/command.rs @@ -50,6 +50,9 @@ impl Command { ), Error, > { + #[cfg(feature = "tracing")] + tracing::debug!(cmd = ?self.builder.as_std()); + let mut channel = self.builder.spawn().map_err(Error::Ssh)?; let child_stdin = channel.stdin.take();