internal: disable HTML encoding in logrus

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-04-04 22:57:55 +02:00
parent 0c2e9234bf
commit 82a999f95d
4 changed files with 4 additions and 1 deletions

View file

@ -27,6 +27,7 @@ func main() {
log.FieldKeyMsg: "event", log.FieldKeyMsg: "event",
log.FieldKeyTime: "timestamp", log.FieldKeyTime: "timestamp",
}, },
DisableHTMLEscape: true,
}) })
go debug.EnableDebugServer() go debug.EnableDebugServer()
akURL, found := os.LookupEnv("AUTHENTIK_HOST") akURL, found := os.LookupEnv("AUTHENTIK_HOST")

View file

@ -32,6 +32,7 @@ func main() {
log.FieldKeyMsg: "event", log.FieldKeyMsg: "event",
log.FieldKeyTime: "timestamp", log.FieldKeyTime: "timestamp",
}, },
DisableHTMLEscape: true,
}) })
go debug.EnableDebugServer() go debug.EnableDebugServer()
akURL, found := os.LookupEnv("AUTHENTIK_HOST") akURL, found := os.LookupEnv("AUTHENTIK_HOST")

View file

@ -28,6 +28,7 @@ func main() {
log.FieldKeyMsg: "event", log.FieldKeyMsg: "event",
log.FieldKeyTime: "timestamp", log.FieldKeyTime: "timestamp",
}, },
DisableHTMLEscape: true,
}) })
go debug.EnableDebugServer() go debug.EnableDebugServer()
l := log.WithField("logger", "authentik.root") l := log.WithField("logger", "authentik.root")

View file

@ -86,6 +86,6 @@ func ConfigureLogger() {
if G.Debug { if G.Debug {
log.SetFormatter(&log.TextFormatter{FieldMap: fm}) log.SetFormatter(&log.TextFormatter{FieldMap: fm})
} else { } else {
log.SetFormatter(&log.JSONFormatter{FieldMap: fm}) log.SetFormatter(&log.JSONFormatter{FieldMap: fm, DisableHTMLEscape: true})
} }
} }