remove a flag to config a logger
Flag at looger must be initaialized earlier than init() funcs.
However, in that case, flags at commands cannot be initialized.
So, the logger flag is removed,
and only allows to be configured using a file described
in an environment or a current path
@@ -6,7 +6,6 @@ import (
"sync"
"github.com/rs/zerolog"
- "github.com/spf13/pflag"
"github.com/spf13/viper"
)
@@ -27,12 +26,6 @@ func loadConfigFile() *viper.Viper {
// init viper
viperConf.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viperConf.SetEnvPrefix(confEnvPrefix)
-
- // bind flag
- pflag.String(confFilePathKey, "", "a config file path for an arglib logger")
- pflag.Parse()
- viperConf.BindPFlags(pflag.CommandLine)
-
viperConf.AutomaticEnv()
// search a default conf file
