add logging
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
5089535fce
commit
e1aff8d16b
7 changed files with 73 additions and 33 deletions
|
|
@ -26,6 +26,8 @@ func Load(cfgFile string) (*Config, error) {
|
|||
viper.SetDefault("db.path", "./clonepack.db")
|
||||
viper.SetDefault("data_dir", "./data")
|
||||
viper.SetDefault("sync.interval", "1h")
|
||||
viper.SetDefault("log.level", "info")
|
||||
viper.SetDefault("log.format", "text")
|
||||
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue