mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
functional: add "LogLevel" flags
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
This commit is contained in:
parent
22a3ec3ac5
commit
f1c7fd3d53
@ -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: ""
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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 {
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user