TUN-1389: Non-scalar flags in a cloudflared config.yml don't get logged
This commit is contained in:
parent
5a0b7ecb62
commit
b02718f86b
|
@ -70,8 +70,16 @@ func logClientOptions(c *cli.Context) {
|
||||||
for _, flag := range c.LocalFlagNames() {
|
for _, flag := range c.LocalFlagNames() {
|
||||||
flags[flag] = c.Generic(flag)
|
flags[flag] = c.Generic(flag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sliceFlags := []string{"header", "tag", "proxy-dns-upstream", "upstream", "edge"}
|
||||||
|
for _, sliceFlag := range sliceFlags {
|
||||||
|
if len(c.StringSlice(sliceFlag)) > 0 {
|
||||||
|
flags[sliceFlag] = strings.Join(c.StringSlice(sliceFlag), ", ")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if len(flags) > 0 {
|
if len(flags) > 0 {
|
||||||
logger.Infof("Flags %v", flags)
|
logger.WithFields(flags).Info("Flags")
|
||||||
}
|
}
|
||||||
|
|
||||||
envs := make(map[string]string)
|
envs := make(map[string]string)
|
||||||
|
|
Loading…
Reference in New Issue