Merge pull request #3364 from Agilicus/escape-json

fix: disable DisableHTMLEscape on logrus json logging
master
Wang Yan 2021-03-24 11:16:55 +08:00 committed by GitHub
commit 077b38b95e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -354,7 +354,8 @@ func configureLogging(ctx context.Context, config *configuration.Configuration)
switch formatter {
case "json":
log.SetFormatter(&log.JSONFormatter{
TimestampFormat: time.RFC3339Nano,
TimestampFormat: time.RFC3339Nano,
DisableHTMLEscape: true,
})
case "text":
log.SetFormatter(&log.TextFormatter{