Skip to content

Commit

Permalink
refactor: remove useless initNetworkLog function
Browse files Browse the repository at this point in the history
  • Loading branch information
idealhack committed Jun 1, 2018
1 parent c622311 commit 627d187
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions daemon/mgr/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"net"
"path"
"strings"
"time"

apitypes "github.com/alibaba/pouch/apis/types"
"github.com/alibaba/pouch/daemon/config"
Expand Down Expand Up @@ -69,8 +68,6 @@ func NewNetworkManager(cfg *config.Config, store *meta.Store, ctrMgr ContainerMg
cfg.NetworkConfg.MetaPath = path.Dir(store.BaseDir)
cfg.NetworkConfg.ExecRoot = network.DefaultExecRoot

initNetworkLog(cfg)

// get active sandboxes
ctrs, err := ctrMgr.List(context.Background(),
func(c *Container) bool {
Expand Down Expand Up @@ -536,18 +533,6 @@ func (nm *NetworkManager) getNetworkSandbox(id string) libnetwork.Sandbox {
return sb
}

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

formatter := &logrus.TextFormatter{
FullTimestamp: true,
TimestampFormat: time.RFC3339Nano,
}
logrus.SetFormatter(formatter)
}

func endpointOptions(n libnetwork.Network, endpoint *types.Endpoint) ([]libnetwork.EndpointOption, error) {
var createOptions []libnetwork.EndpointOption
epConfig := endpoint.EndpointConfig
Expand Down

0 comments on commit 627d187

Please sign in to comment.