mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
*: use "zap.Field"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
44385bc7b9
commit
5828efda38
@ -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"
|
||||
@ -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()),
|
||||
|
||||
@ -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
|
||||
@ -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),
|
||||
|
||||
@ -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 (
|
||||
@ -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),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user