Skip to content

Commit

Permalink
Merge pull request #1239 from rudyfly/log-format
Browse files Browse the repository at this point in the history
bugfix: modify log format
  • Loading branch information
HusterWan authored Apr 27, 2018
2 parents 7bef230 + aa90cda commit 9afc12e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions daemon/mgr/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net"
"path"
"strings"
"time"

apitypes "github.com/alibaba/pouch/apis/types"
"github.com/alibaba/pouch/daemon/config"
Expand Down Expand Up @@ -486,9 +487,8 @@ func initNetworkLog(cfg *config.Config) {
}

formatter := &netlog.TextFormatter{
ForceColors: true,
FullTimestamp: true,
TimestampFormat: "2006-01-02 15:04:05.000000000",
TimestampFormat: time.RFC3339Nano,
}
netlog.SetFormatter(formatter)
}
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"path"
"strings"
"syscall"
"time"

"github.com/alibaba/pouch/daemon"
"github.com/alibaba/pouch/daemon/config"
Expand Down Expand Up @@ -239,7 +240,7 @@ func initLog() {

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

0 comments on commit 9afc12e

Please sign in to comment.