소스 검색

functional: add "LogLevel" flags

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Gyuho Lee 6 년 전
부모
커밋
f1c7fd3d53
6개의 변경된 파일625개의 추가작업 그리고 183개의 파일을 삭제
  1. 3 3
      functional.yaml
  2. 2 2
      functional/rpcpb/etcd_config.go
  3. 3 3
      functional/rpcpb/etcd_config_test.go
  4. 614 172
      functional/rpcpb/rpc.pb.go
  5. 1 1
      functional/rpcpb/rpc.proto
  6. 2 2
      functional/scripts/genproto.sh

+ 3 - 3
functional.yaml

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

+ 2 - 2
functional/rpcpb/etcd_config.go

@@ -60,7 +60,7 @@ var etcdFields = []string{
 
 	"Logger",
 	"LogOutputs",
-	"Debug",
+	"LogLevel",
 }
 
 // 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.LogOutputs = e.LogOutputs
-	cfg.Debug = e.Debug
+	cfg.LogLevel = e.LogLevel
 
 	return cfg, nil
 }

+ 3 - 3
functional/rpcpb/etcd_config_test.go

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

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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\""];
   // LogOutputs is the log file to store current etcd server logs.
   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 {

+ 2 - 2
functional/scripts/genproto.sh

@@ -7,8 +7,8 @@ if ! [[ "$0" =~ "scripts/genproto.sh" ]]; then
 fi
 
 # 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
 fi
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.