Add support for JSON logging
This commit is contained in:
parent
43f32731f6
commit
c6177c4d18
2 changed files with 6 additions and 0 deletions
|
@ -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…
Reference in a new issue