1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 23:20:48 +00:00

Merge pull request #4038 from flycash/fixbug

Fix ES index problem
This commit is contained in:
Ming Deng 2020-06-28 23:14:07 +08:00 committed by GitHub
commit 26beef756f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,8 +60,8 @@ func (el *esLogger) WriteMsg(when time.Time, msg string, level int) error {
}
idx := LogDocument{
timestamp: when.Format(time.RFC3339),
msg: msg,
Timestamp: when.Format(time.RFC3339),
Msg: msg,
}
body, err := json.Marshal(idx)
@ -87,8 +87,8 @@ func (el *esLogger) Flush() {
}
type LogDocument struct {
timestamp string
msg string
Timestamp string `json:"timestamp"`
Msg string `json:"msg"`
}
func init() {