example of refactoring settings tracing away

This commit is contained in:
A.Unger
2021-03-12 10:56:20 +01:00
parent b52fe95762
commit 3901680fba
3 changed files with 148 additions and 161 deletions
-3
View File
@@ -10,20 +10,17 @@ func RootWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "log-level",
Value: "info",
Usage: "Set logging level",
EnvVars: []string{"GLAUTH_LOG_LEVEL", "OCIS_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
&cli.BoolFlag{
Value: true,
Name: "log-pretty",
Usage: "Enable pretty logging",
EnvVars: []string{"GLAUTH_LOG_PRETTY", "OCIS_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
&cli.BoolFlag{
Value: true,
Name: "log-color",
Usage: "Enable colored logging",
EnvVars: []string{"GLAUTH_LOG_COLOR", "OCIS_LOG_COLOR"},