diff options
| author | Shulhan <m.shulhan@gmail.com> | 2020-04-29 13:22:30 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2020-04-29 13:22:30 +0700 |
| commit | 26165c07f45ccda325fd2b39ebd0347734e0f90e (patch) | |
| tree | 9d3a5abb2b3bcd2781705313ecb95153f541994e /command.go | |
| parent | 9fd58010757f96bb66757cc6b323fab64270a61e (diff) | |
| download | awwan-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.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 { |
