fix log config priority
This commit is contained in:
@@ -11,19 +11,19 @@ func RootWithConfig(cfg *config.Config) []cli.Flag {
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "log-level",
|
Name: "log-level",
|
||||||
Usage: "Set logging level",
|
Usage: "Set logging level",
|
||||||
EnvVars: []string{"OCIS_LOG_LEVEL"},
|
EnvVars: []string{"SETTINGS_LOG_LEVEL", "OCIS_LOG_LEVEL"},
|
||||||
Destination: &cfg.Log.Level,
|
Destination: &cfg.Log.Level,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "log-pretty",
|
Name: "log-pretty",
|
||||||
Usage: "Enable pretty logging",
|
Usage: "Enable pretty logging",
|
||||||
EnvVars: []string{"OCIS_LOG_PRETTY"},
|
EnvVars: []string{"SETTINGS_LOG_PRETTY", "OCIS_LOG_PRETTY"},
|
||||||
Destination: &cfg.Log.Pretty,
|
Destination: &cfg.Log.Pretty,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "log-color",
|
Name: "log-color",
|
||||||
Usage: "Enable colored logging",
|
Usage: "Enable colored logging",
|
||||||
EnvVars: []string{"OCIS_LOG_COLOR"},
|
EnvVars: []string{"SETTINGS_LOG_COLOR", "OCIS_LOG_COLOR"},
|
||||||
Destination: &cfg.Log.Color,
|
Destination: &cfg.Log.Color,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user