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/vendor/src/code.google.com/p/go/src/pkg/archive/tar"
"github.com/docker/docker/pkg/fileutils" "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/pools"
"github.com/docker/docker/pkg/promise" "github.com/docker/docker/pkg/promise"
"github.com/docker/docker/pkg/system" "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/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/pools"
"github.com/docker/docker/pkg/system" "github.com/docker/docker/pkg/system"
) )

View file

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

View file

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

View file

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

View file

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

View file

@ -8,9 +8,18 @@ import (
"strings" "strings"
"time" "time"
log "github.com/Sirupsen/logrus"
"github.com/docker/docker/pkg/timeutils" "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 type priority int
const ( const (

View file

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

View file

@ -5,7 +5,7 @@ import (
"errors" "errors"
"io" "io"
"github.com/docker/docker/pkg/log" log "github.com/Sirupsen/logrus"
) )
const ( 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/vendor/src/code.google.com/p/go/src/pkg/archive/tar"
"github.com/docker/docker/pkg/log" log "github.com/Sirupsen/logrus"
) )
const ( const (