Use logrus everywhere for logging

Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
This commit is contained in:
Alexandr Morozov 2014-10-24 10:12:35 -07:00
parent 8e63996484
commit 712a6554ce
10 changed files with 18 additions and 9 deletions

View file

@ -19,7 +19,7 @@ import (
"github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar"
"github.com/docker/docker/pkg/fileutils"
"github.com/docker/docker/pkg/log"
log "github.com/Sirupsen/logrus"
"github.com/docker/docker/pkg/pools"
"github.com/docker/docker/pkg/promise"
"github.com/docker/docker/pkg/system"

View file

@ -12,7 +12,7 @@ import (
"github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar"
"github.com/docker/docker/pkg/log"
log "github.com/Sirupsen/logrus"
"github.com/docker/docker/pkg/pools"
"github.com/docker/docker/pkg/system"
)

View file

@ -7,7 +7,7 @@ import (
"time"
"github.com/docker/docker/pkg/jsonlog"
"github.com/docker/docker/pkg/log"
log "github.com/Sirupsen/logrus"
)
// BroadcastWriter accumulate multiple io.WriteCloser by stream.

View file

@ -1,7 +1,7 @@
package fileutils
import (
"github.com/docker/docker/pkg/log"
log "github.com/Sirupsen/logrus"
"path/filepath"
)

View file

@ -6,7 +6,7 @@ import (
"net/http"
"time"
"github.com/docker/docker/pkg/log"
log "github.com/Sirupsen/logrus"
)
type resumableRequestReader struct {

View file

@ -9,7 +9,7 @@ import (
"strconv"
"strings"
"github.com/docker/docker/pkg/log"
log "github.com/Sirupsen/logrus"
)
type Action string

View file

@ -8,9 +8,18 @@ import (
"strings"
"time"
log "github.com/Sirupsen/logrus"
"github.com/docker/docker/pkg/timeutils"
)
func init() {
log.SetOutput(os.Stderr)
log.SetLevel(log.InfoLevel)
if os.Getenv("DEBUG") != "" {
log.SetLevel(log.DebugLevel)
}
}
type priority int
const (

View file

@ -6,7 +6,7 @@ import (
"sync/atomic"
"syscall"
"github.com/docker/docker/pkg/log"
log "github.com/Sirupsen/logrus"
)
// Trap sets up a simplified signal "trap", appropriate for common

View file

@ -5,7 +5,7 @@ import (
"errors"
"io"
"github.com/docker/docker/pkg/log"
log "github.com/Sirupsen/logrus"
)
const (

View file

@ -13,7 +13,7 @@ import (
"github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar"
"github.com/docker/docker/pkg/log"
log "github.com/Sirupsen/logrus"
)
const (