Browse Source

functional: add "LogLevel" flags

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Gyuho Lee 6 years ago
parent
commit
f1c7fd3d53

+ 3 - 3
functional.yaml

@@ -35,7 +35,7 @@ agent-configs:
     initial-corrupt-check: true
     initial-corrupt-check: true
     logger: zap
     logger: zap
     log-outputs: [/tmp/etcd-functional-1/etcd.log]
     log-outputs: [/tmp/etcd-functional-1/etcd.log]
-    debug: true
+    log-level: info
   client-cert-data: ""
   client-cert-data: ""
   client-cert-path: ""
   client-cert-path: ""
   client-key-data: ""
   client-key-data: ""
@@ -86,7 +86,7 @@ agent-configs:
     initial-corrupt-check: true
     initial-corrupt-check: true
     logger: zap
     logger: zap
     log-outputs: [/tmp/etcd-functional-2/etcd.log]
     log-outputs: [/tmp/etcd-functional-2/etcd.log]
-    debug: true
+    log-level: info
   client-cert-data: ""
   client-cert-data: ""
   client-cert-path: ""
   client-cert-path: ""
   client-key-data: ""
   client-key-data: ""
@@ -137,7 +137,7 @@ agent-configs:
     initial-corrupt-check: true
     initial-corrupt-check: true
     logger: zap
     logger: zap
     log-outputs: [/tmp/etcd-functional-3/etcd.log]
     log-outputs: [/tmp/etcd-functional-3/etcd.log]
-    debug: true
+    log-level: info
   client-cert-data: ""
   client-cert-data: ""
   client-cert-path: ""
   client-cert-path: ""
   client-key-data: ""
   client-key-data: ""

+ 2 - 2
functional/rpcpb/etcd_config.go

@@ -60,7 +60,7 @@ var etcdFields = []string{
 
 
 	"Logger",
 	"Logger",
 	"LogOutputs",
 	"LogOutputs",
-	"Debug",
+	"LogLevel",
 }
 }
 
 
 // Flags returns etcd flags in string slice.
 // Flags returns etcd flags in string slice.
@@ -168,7 +168,7 @@ func (e *Etcd) EmbedConfig() (cfg *embed.Config, err error) {
 
 
 	cfg.Logger = e.Logger
 	cfg.Logger = e.Logger
 	cfg.LogOutputs = e.LogOutputs
 	cfg.LogOutputs = e.LogOutputs
-	cfg.Debug = e.Debug
+	cfg.LogLevel = e.LogLevel
 
 
 	return cfg, nil
 	return cfg, nil
 }
 }

+ 3 - 3
functional/rpcpb/etcd_config_test.go

@@ -59,7 +59,7 @@ func TestEtcd(t *testing.T) {
 
 
 		Logger:     "zap",
 		Logger:     "zap",
 		LogOutputs: []string{"/tmp/etcd-functional-1/etcd.log"},
 		LogOutputs: []string{"/tmp/etcd-functional-1/etcd.log"},
-		Debug:      true,
+		LogLevel:   "info",
 	}
 	}
 
 
 	exps := []string{
 	exps := []string{
@@ -85,7 +85,7 @@ func TestEtcd(t *testing.T) {
 		"--experimental-initial-corrupt-check=true",
 		"--experimental-initial-corrupt-check=true",
 		"--logger=zap",
 		"--logger=zap",
 		"--log-outputs=/tmp/etcd-functional-1/etcd.log",
 		"--log-outputs=/tmp/etcd-functional-1/etcd.log",
-		"--debug=true",
+		"--log-level=info",
 	}
 	}
 	fs := e.Flags()
 	fs := e.Flags()
 	if !reflect.DeepEqual(exps, fs) {
 	if !reflect.DeepEqual(exps, fs) {
@@ -134,7 +134,7 @@ func TestEtcd(t *testing.T) {
 	expc.ExperimentalInitialCorruptCheck = true
 	expc.ExperimentalInitialCorruptCheck = true
 	expc.Logger = "zap"
 	expc.Logger = "zap"
 	expc.LogOutputs = []string{"/tmp/etcd-functional-1/etcd.log"}
 	expc.LogOutputs = []string{"/tmp/etcd-functional-1/etcd.log"}
-	expc.Debug = true
+	expc.LogLevel = "info"
 	cfg, err := e.EmbedConfig()
 	cfg, err := e.EmbedConfig()
 	if err != nil {
 	if err != nil {
 		t.Fatal(err)
 		t.Fatal(err)

File diff suppressed because it is too large
+ 614 - 172
functional/rpcpb/rpc.pb.go


+ 1 - 1
functional/rpcpb/rpc.proto

@@ -234,7 +234,7 @@ message Etcd {
   string Logger = 71 [(gogoproto.moretags) = "yaml:\"logger\""];
   string Logger = 71 [(gogoproto.moretags) = "yaml:\"logger\""];
   // LogOutputs is the log file to store current etcd server logs.
   // LogOutputs is the log file to store current etcd server logs.
   repeated string LogOutputs = 72 [(gogoproto.moretags) = "yaml:\"log-outputs\""];
   repeated string LogOutputs = 72 [(gogoproto.moretags) = "yaml:\"log-outputs\""];
-  bool Debug = 73 [(gogoproto.moretags) = "yaml:\"debug\""];
+  string LogLevel = 73 [(gogoproto.moretags) = "yaml:\"log-level\""];
 }
 }
 
 
 enum Operation {
 enum Operation {

+ 2 - 2
functional/scripts/genproto.sh

@@ -7,8 +7,8 @@ if ! [[ "$0" =~ "scripts/genproto.sh" ]]; then
 fi
 fi
 
 
 # for now, be conservative about what version of protoc we expect
 # for now, be conservative about what version of protoc we expect
-if ! [[ $(protoc --version) =~ "3.6.0" ]]; then
-  echo "could not find protoc 3.6.0, is it installed + in PATH?"
+if ! [[ $(protoc --version) =~ "3.7.1" ]]; then
+  echo "could not find protoc 3.7.1, is it installed + in PATH?"
   exit 255
   exit 255
 fi
 fi
 
 

Some files were not shown because too many files changed in this diff