Improve logging handling #57

Merged
konrad merged 14 commits from fix-logging-chaos into master 2019-01-25 11:40:54 +00:00
Showing only changes of commit 9a1eff5305 - Show all commits

View File

@ -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
}