Use Sirupsen/logrus logger in the Weave tagger

This commit is contained in:
Alfonso Acosta
2016-02-17 16:25:00 +00:00
parent a2710ecfd5
commit f96e7dffa9
2 changed files with 6 additions and 5 deletions

View File

@@ -1,8 +1,9 @@
package backoff
import (
"log"
"time"
log "github.com/Sirupsen/logrus"
)
type backoff struct {
@@ -69,10 +70,10 @@ func (b *backoff) Start() {
if shouldLog {
if err != nil {
log.Printf("Error %s, backing off %s: %s",
log.Errorf("Error %s, backing off %s: %s",
b.msg, backoff, err)
} else {
log.Printf("Success %s", b.msg)
log.Infof("Success %s", b.msg)
}
}

View File

@@ -4,13 +4,13 @@ import (
"bufio"
"bytes"
"fmt"
"log"
"net"
"net/http"
"net/url"
"regexp"
"strconv"
log "github.com/Sirupsen/logrus"
"github.com/ugorji/go/codec"
"github.com/weaveworks/scope/common/exec"
@@ -127,7 +127,7 @@ func (c *client) PS() (map[string]PSEntry, error) {
}
defer func() {
if err := cmd.Wait(); err != nil {
log.Printf("'weave ps' cmd failed: %v", err)
log.Errorf("'weave ps' cmd failed: %v", err)
}
}()