Skip to content

Commit

Permalink
bugfix: corrent the import path of logrus
Browse files Browse the repository at this point in the history
Signed-off-by: 程飞 <fay.cheng.cn@gmail.com>
  • Loading branch information
faycheng committed Mar 23, 2018
1 parent ecdb925 commit 8e70a80
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
7 changes: 3 additions & 4 deletions daemon/mgr/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/alibaba/pouch/pkg/meta"
"github.com/alibaba/pouch/pkg/randomid"

netlog "github.com/Sirupsen/logrus"
"github.com/docker/go-connections/nat"
"github.com/docker/libnetwork"
nwconfig "github.com/docker/libnetwork/config"
Expand Down Expand Up @@ -411,15 +410,15 @@ func (nm *NetworkManager) getNetworkSandbox(id string) libnetwork.Sandbox {

func initNetworkLog(cfg *config.Config) {
if cfg.Debug {
netlog.SetLevel(netlog.DebugLevel)
logrus.SetLevel(logrus.DebugLevel)
}

formatter := &netlog.TextFormatter{
formatter := &logrus.TextFormatter{
ForceColors: true,
FullTimestamp: true,
TimestampFormat: "2006-01-02 15:04:05.000000000",
}
netlog.SetFormatter(formatter)
logrus.SetFormatter(formatter)
}

func endpointOptions(n libnetwork.Network, nwconfig *apitypes.NetworkSettings, epConfig *apitypes.EndpointSettings) ([]libnetwork.EndpointOption, error) {
Expand Down
2 changes: 1 addition & 1 deletion network/mode/bridge/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (

"github.com/alibaba/pouch/apis/types"
"github.com/alibaba/pouch/daemon/mgr"
"github.com/alibaba/pouch/extra/libnetwork/Godeps/_workspace/src/github.com/Sirupsen/logrus"
"github.com/alibaba/pouch/network"
"github.com/alibaba/pouch/pkg/errtypes"

"github.com/docker/libnetwork/drivers/bridge"
"github.com/docker/libnetwork/netlabel"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/vishvananda/netlink"
)

Expand Down
2 changes: 1 addition & 1 deletion registry/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/alibaba/pouch/apis/types"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
)

// challengeClient defines a client to manage challenge–response authentication.
Expand Down
7 changes: 3 additions & 4 deletions volume/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"reflect"

"github.com/alibaba/pouch/extra/libnetwork/Godeps/_workspace/src/github.com/Sirupsen/logrus"
"github.com/alibaba/pouch/pkg/client"
metastore "github.com/alibaba/pouch/pkg/meta"
"github.com/alibaba/pouch/volume/driver"
Expand All @@ -13,7 +12,7 @@ import (
"github.com/alibaba/pouch/volume/types/meta"

"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"github.com/sirupsen/logrus"
)

// Core represents volume core struct.
Expand Down Expand Up @@ -45,7 +44,7 @@ func NewCore(cfg Config) (*Core, error) {
},
})
if err != nil {
log.Errorf("failed to create volume meta store: %v", err)
logrus.Errorf("failed to create volume meta store: %v", err)
return nil, err
}

Expand Down Expand Up @@ -206,7 +205,7 @@ func (c *Core) ListVolumeName(labels map[string]string) ([]string, error) {
return nil, errors.Wrap(err, "List volume's name")
}

log.Debugf("List volume URL: %s, labels: %s", url, labels)
logrus.Debugf("List volume URL: %s, labels: %s", url, labels)

if err := client.New().ListKeys(url, &names); err != nil {
return nil, errors.Wrap(err, "List volume's name")
Expand Down

0 comments on commit 8e70a80

Please sign in to comment.