aboutsummaryrefslogtreecommitdiff
path: root/command.go
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2020-04-29 13:22:30 +0700
committerShulhan <m.shulhan@gmail.com>2020-04-29 13:22:30 +0700
commit26165c07f45ccda325fd2b39ebd0347734e0f90e (patch)
tree9d3a5abb2b3bcd2781705313ecb95153f541994e /command.go
parent9fd58010757f96bb66757cc6b323fab64270a61e (diff)
downloadawwan-26165c07f45ccda325fd2b39ebd0347734e0f90e.tar.xz
all: print message to stderr instead of stdout
This will allow piping the actual output of executed command to stdout or file.
Diffstat (limited to 'command.go')
-rw-r--r--command.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/command.go b/command.go
index 9e40ab2..a00e084 100644
--- a/command.go
+++ b/command.go
@@ -261,7 +261,7 @@ func (cmd *Command) executeLocalScript() {
continue
}
- fmt.Printf(">>> local %d: %s\n\n", x, stmt)
+ log.Printf(">>> local %d: %s\n\n", x, stmt)
err := cmd.exec(string(stmt))
if err != nil {
@@ -305,7 +305,7 @@ func (cmd *Command) executeScript() {
continue
}
- fmt.Printf(">>> %s: %d: %s\n\n", cmd.sshClient, x, stmt)
+ log.Printf(">>> %s: %d: %s\n\n", cmd.sshClient, x, stmt)
err := cmd.sshClient.Execute(string(stmt))
if err != nil {