From 0e6ebfa1f6062c5c65062a233bb1808f4b7263d7 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Sun, 28 Jul 2013 20:19:39 -0700 Subject: [PATCH] add veryverbose to ouput raft debug info --- etcd.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/etcd.go b/etcd.go index 879f0f885..6b92de261 100644 --- a/etcd.go +++ b/etcd.go @@ -27,6 +27,7 @@ import ( //------------------------------------------------------------------------------ var verbose bool +var veryVerbose bool var machines string var machinesFile string @@ -58,6 +59,7 @@ var retryTimes int func init() { flag.BoolVar(&verbose, "v", false, "verbose logging") + flag.BoolVar(&veryVerbose, "vv", false, "very verbose logging") flag.StringVar(&machines, "C", "", "the ip address and port of a existing machines in the cluster, sepearate by comma") flag.StringVar(&machinesFile, "CF", "", "the file contains a list of existing machines in the cluster, seperate by comma") @@ -154,6 +156,11 @@ var info *Info func main() { flag.Parse() + if veryVerbose { + verbose = true + raft.SetLogLevel(raft.Debug) + } + if machines != "" { cluster = strings.Split(machines, ",") } else if machinesFile != "" {