From f523b0b33f7f688fb3dd1ddbe7df2a395baa2d9b Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Thu, 17 May 2018 13:59:29 -0700 Subject: [PATCH] tools/etcd-dump-logs: pass zap logger to raftsnap Signed-off-by: Gyuho Lee --- tools/etcd-dump-logs/main.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/etcd-dump-logs/main.go b/tools/etcd-dump-logs/main.go index c741886bc..f95eaa6a4 100644 --- a/tools/etcd-dump-logs/main.go +++ b/tools/etcd-dump-logs/main.go @@ -36,9 +36,9 @@ import ( func main() { snapfile := flag.String("start-snap", "", "The base name of snapshot file to start dumping") index := flag.Uint64("start-index", 0, "The index to start dumping") - entrytype := flag.String("entry-type", "", `If set, filters output by entry type. Must be one or more than one of: - ConfigChange, Normal, Request, InternalRaftRequest, - IRRRange, IRRPut, IRRDeleteRange, IRRTxn, + entrytype := flag.String("entry-type", "", `If set, filters output by entry type. Must be one or more than one of: + ConfigChange, Normal, Request, InternalRaftRequest, + IRRRange, IRRPut, IRRDeleteRange, IRRTxn, IRRCompaction, IRRLeaseGrant, IRRLeaseRevoke`) flag.Parse() @@ -68,7 +68,7 @@ func main() { ss := raftsnap.New(zap.NewExample(), snapDir(dataDir)) snapshot, err = ss.Load() } else { - snapshot, err = raftsnap.Read(filepath.Join(snapDir(dataDir), *snapfile)) + snapshot, err = raftsnap.Read(zap.NewExample(), filepath.Join(snapDir(dataDir), *snapfile)) } switch err { @@ -269,9 +269,9 @@ func evaluateEntrytypeFlag(entrytype string) []EntryFilter { if f, ok := validRequest[et]; ok { filters = append(filters, f...) } else { - log.Printf(`[%+v] is not a valid entry-type, ignored. -Please set entry-type to one or more of the following: -ConfigChange, Normal, Request, InternalRaftRequest, + log.Printf(`[%+v] is not a valid entry-type, ignored. +Please set entry-type to one or more of the following: +ConfigChange, Normal, Request, InternalRaftRequest, IRRRange, IRRPut, IRRDeleteRange, IRRTxn, IRRCompaction, IRRLeaseGrant, IRRLeaseRevoke`, et) }