Skip to content

Commit

Permalink
Merge pull request #974 from weaveworks/fix-weave-tagger-logging
Browse files Browse the repository at this point in the history
Use Sirupsen/logrus logger in the Weave tagger
  • Loading branch information
paulbellamy committed Feb 18, 2016
2 parents 07d3420 + f96e7df commit 7bd7cb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions common/backoff/backoff.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package backoff

import (
"log"
"time"

log "github.com/Sirupsen/logrus"
)

type backoff struct {
Expand Down Expand Up @@ -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)
}
}

Expand Down
4 changes: 2 additions & 2 deletions common/weave/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
}()

Expand Down

0 comments on commit 7bd7cb7

Please sign in to comment.