Add support for JSON logging

main
Jan Dittberner 10 months ago
parent 43f32731f6
commit c6177c4d18

@ -72,6 +72,10 @@ func main() {
logger.SetLevel(logLevel)
}
if config.Bool("log.json") {
logger.SetFormatter(&log.JSONFormatter{})
}
bundle, catalog := services.InitI18n(logger, config.Strings("i18n.languages"))
services.AddMessages(catalog)

@ -43,6 +43,8 @@ var DefaultConfiguration = map[string]interface{}{
"oidc.server": "https://auth.cacert.localhost:4444/",
"session.path": "sessions/app",
"i18n.languages": []string{"en", "de"},
"log.level": "info",
"log.json": true,
}
func ConfigureApplication(

Loading…
Cancel
Save