allow debug mode from ENV or config.
This commit is contained in:
parent
ac7200c630
commit
46c05aa49f
1 changed files with 5 additions and 0 deletions
|
|
@ -104,6 +104,11 @@ func init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// debug mode from ENV or config
|
||||||
|
if viper.GetBool("debug") {
|
||||||
|
zerolog.SetGlobalLevel(zerolog.DebugLevel)
|
||||||
|
}
|
||||||
|
|
||||||
file := viper.ConfigFileUsed()
|
file := viper.ConfigFileUsed()
|
||||||
logger := log.With().
|
logger := log.With().
|
||||||
Bool("debug", viper.GetBool("debug")).
|
Bool("debug", viper.GetBool("debug")).
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue