Log to standard error in legacy fabric
The Infof() call was getting sent to stdout, causing serious JSON
deserialization and parsing issues.
@@ -4,8 +4,8 @@ import (
"bufio"
"encoding/json"
- "golang.org/x/crypto/ssh"
"github.com/jhunt/go-log"
+ "golang.org/x/crypto/ssh"
"github.com/starkandwayne/shield/core/scheduler"
"github.com/starkandwayne/shield/core/vault"
@@ -125,7 +125,7 @@ func (f LegacyFabric) Execute(op, id string, command Command) scheduler.Chore {
}
payload := string(b)
- chore.Infof("connecing to %s (tcp/ipv4)", f.ip)
+ chore.Errorf("connecing to %s (tcp/ipv4)", f.ip)
conn, err := ssh.Dial("tcp4", f.ip, f.ssh)
if err != nil {
chore.Errorf("ERR> unable to connect to %s: %s", err)
