From 2d1a6f8acd054a775ad8a224c89179e746aee42a Mon Sep 17 00:00:00 2001 From: Kimmo Lehto Date: Thu, 19 Aug 2021 15:57:15 +0300 Subject: [PATCH] Add logging to upload (#39) --- ssh.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ssh.go b/ssh.go index 7ed6bffc..f5ebfa0c 100644 --- a/ssh.go +++ b/ssh.go @@ -389,8 +389,10 @@ func (c *SSH) uploadLinux(src, dst string, opts ...exec.Option) error { if err != nil { return err } + cmd := fmt.Sprintf("gzip -d | %s", teeCmd) - err = session.Start(fmt.Sprintf("gzip -d | %s", teeCmd)) + log.Debugf("%s: executing: %s", c, cmd) + err = session.Start(cmd) if err != nil { return err }