"github.com/fsnotify/fsnotify"
"github.com/spf13/viper"
"os"
+ "path/filepath"
)
type Configurator struct {
return *fileName
}
-func LoadConfig() (l Log) {
- l = Log{}
+func LoadConfig() (l *Log) {
+ l = NewLogger(filepath.Base(os.Args[0]))
viper.SetConfigFile(parseCmd())
if err := viper.ReadInConfig(); err != nil {
func (*Configurator) GetInt(key string) int {
return viper.GetInt(key)
}
+
+func (*Configurator) GetUint32(key string) uint32 {
+ return viper.GetUint32(key)
+}
+
+func (*Configurator) GetBool(key string) bool {
+ return viper.GetBool(key)
+}