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
+1 -1
View File
@@ -103,7 +103,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
Name: "public-url",
Value: flags.OverrideDefaultString(cfg.Reva.Frontend.PublicURL, "https://localhost:9200"),
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_FRONTEND_PUBLIC_URL", "OCIS_URL"}, // STORAGE_FRONTEND_PUBLIC_URL takes precedence over OCIS_URL
EnvVars: []string{"OCIS_URL", "STORAGE_FRONTEND_PUBLIC_URL"}, // STORAGE_FRONTEND_PUBLIC_URL takes precedence over OCIS_URL
Destination: &cfg.Reva.Frontend.PublicURL,
},
&cli.StringSliceFlag{
+1 -1
View File
@@ -186,7 +186,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "public-url",
Value: flags.OverrideDefaultString(cfg.Reva.Frontend.PublicURL, "https://localhost:9200"),
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_FRONTEND_PUBLIC_URL", "OCIS_URL"}, // STORAGE_FRONTEND_PUBLIC_URL takes precedence over OCIS_URL
EnvVars: []string{"OCIS_URL", "STORAGE_FRONTEND_PUBLIC_URL"}, // STORAGE_FRONTEND_PUBLIC_URL takes precedence over OCIS_URL
Destination: &cfg.Reva.Frontend.PublicURL,
},
&cli.StringFlag{
+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,
},
}