Skip to content

Commit

Permalink
Merge pull request #953 from faycheng/correct-sirupsen-import
Browse files Browse the repository at this point in the history
bugfix: corrent the import path of logrus
  • Loading branch information
allencloud authored Mar 23, 2018
2 parents cdc2e13 + 8e70a80 commit f1cee76
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 f1cee76

Please sign in to comment.