1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 09:20:55 +00:00

Allow access log regardless of the log level

This commit is contained in:
Waleed Gadelkareem 2018-04-28 17:15:19 +02:00 committed by GitHub
parent f16688817a
commit 8e61a6a6de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,9 +16,10 @@ package logs
import ( import (
"bytes" "bytes"
"strings"
"encoding/json" "encoding/json"
"time"
"fmt" "fmt"
"time"
) )
const ( const (
@ -53,10 +54,9 @@ func (r *AccessLogRecord) json() ([]byte, error) {
} }
func disableEscapeHTML(i interface{}) { func disableEscapeHTML(i interface{}) {
e, ok := i.(interface { if e, ok := i.(interface {
SetEscapeHTML(bool) SetEscapeHTML(bool)
}); }); ok {
if ok {
e.SetEscapeHTML(false) e.SetEscapeHTML(false)
} }
} }
@ -81,6 +81,5 @@ func AccessLog(r *AccessLogRecord, format string) {
msg = string(jsonData) msg = string(jsonData)
} }
} }
beeLogger.writeMsg(levelLoggerImpl, strings.TrimSpace(msg))
beeLogger.Debug(msg)
} }