sort out flags precedence

This commit is contained in:
A.Unger
2021-11-09 17:30:31 +01:00
parent 713c0bb3d2
commit 51bee0e531
18 changed files with 123 additions and 147 deletions
+3 -3
View File
@@ -18,19 +18,19 @@ func RootWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "log-level",
Usage: "Set logging level",
EnvVars: []string{"STORAGE_LOG_LEVEL", "OCIS_LOG_LEVEL"},
EnvVars: []string{"OCIS_LOG_LEVEL", "STORAGE_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
&cli.BoolFlag{
Name: "log-pretty",
Usage: "Enable pretty logging",
EnvVars: []string{"STORAGE_LOG_PRETTY", "OCIS_LOG_PRETTY"},
EnvVars: []string{"OCIS_LOG_PRETTY", "STORAGE_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
&cli.BoolFlag{
Name: "log-color",
Usage: "Enable colored logging",
EnvVars: []string{"STORAGE_LOG_COLOR", "OCIS_LOG_COLOR"},
EnvVars: []string{"OCIS_LOG_COLOR", "STORAGE_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
}