Skip to content

Commit

Permalink
*: use "zap.Field"
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed May 2, 2018
1 parent 44385bc commit 5828efd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions embed/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import (
"sync"
"time"

"go.uber.org/zap/zapcore"

"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/etcdhttp"
"github.com/coreos/etcd/etcdserver/api/v2http"
Expand Down Expand Up @@ -275,7 +273,7 @@ func (e *Etcd) Config() Config {
// Client requests will be terminated with request timeout.
// After timeout, enforce remaning requests be closed immediately.
func (e *Etcd) Close() {
fields := []zapcore.Field{
fields := []zap.Field{
zap.String("name", e.cfg.Name),
zap.String("data-dir", e.cfg.Dir),
zap.Strings("advertise-peer-urls", e.cfg.getAPURLs()),
Expand Down
3 changes: 1 addition & 2 deletions etcdserver/corrupt.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"github.com/coreos/etcd/pkg/types"

"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)

// CheckInitialHashKV compares initial hash values with its peers
Expand Down Expand Up @@ -58,7 +57,7 @@ func (s *EtcdServer) CheckInitialHashKV() error {
for _, p := range peers {
if p.resp != nil {
peerID := types.ID(p.resp.Header.MemberId)
fields := []zapcore.Field{
fields := []zap.Field{
zap.String("local-member-id", s.ID().String()),
zap.Int64("local-member-revision", rev),
zap.Int64("local-member-compact-revision", crev),
Expand Down
3 changes: 1 addition & 2 deletions etcdserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ import (
"github.com/coreos/go-semver/semver"
"github.com/coreos/pkg/capnslog"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)

const (
Expand Down Expand Up @@ -1816,7 +1815,7 @@ func (s *EtcdServer) sendMergedSnap(merged raftsnap.Message) {
atomic.AddInt64(&s.inflightSnapshots, 1)

lg := s.getLogger()
fields := []zapcore.Field{
fields := []zap.Field{
zap.String("from", s.ID().String()),
zap.String("to", types.ID(merged.To).String()),
zap.Int64("bytes", merged.TotalSize),
Expand Down

0 comments on commit 5828efd

Please sign in to comment.