Improve logging handling #57
@ -40,6 +40,12 @@ var Log = logging.MustGetLogger("vikunja")
|
||||
// InitLogger initializes the global log handler
|
||||
func InitLogger() {
|
||||
if !viper.GetBool("log.enabled") {
|
||||
// Disable all logging when loggin in general is disabled, overwriting everything a user might have set.
|
||||
viper.Set("log.errors", "off")
|
||||
viper.Set("log.standard", "off")
|
||||
viper.Set("log.database", "off")
|
||||
viper.Set("log.http", "off")
|
||||
viper.Set("log.echo", "off")
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user