diff --git a/cmd/run.go b/cmd/run.go index c89f4007..c8f230e9 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -23,18 +23,14 @@ import ( "github.com/spf13/cobra" ) -var ( - globalConfigFile string - pluginConfigFile string -) - var ( hooksConfig = hook.NewHookConfig() DefaultLogger = logging.NewLogger( logging.LoggerConfig{ - Level: zerolog.DebugLevel, + Level: zerolog.InfoLevel, // Default log level NoColor: true, - }) + }, + ) pluginRegistry = plugin.NewRegistry(hooksConfig) // Global koanf instance. Using "." as the key path delimiter. globalConfig = koanf.New(".") @@ -363,12 +359,10 @@ var runCmd = &cobra.Command{ func init() { rootCmd.AddCommand(runCmd) - runCmd.PersistentFlags().StringVarP( - &globalConfigFile, + runCmd.Flags().StringP( "config", "c", "./gatewayd.yaml", "config file (default is ./gatewayd.yaml)") - runCmd.PersistentFlags().StringVarP( - &pluginConfigFile, + runCmd.Flags().StringP( "plugin-config", "p", "./gatewayd_plugins.yaml", "plugin config file (default is ./gatewayd_plugins.yaml)") }