mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 04:50:56 +00:00
Fix ES index problem
This commit is contained in:
parent
6b6a0e8a56
commit
de51bd28d7
@ -60,8 +60,8 @@ func (el *esLogger) WriteMsg(when time.Time, msg string, level int) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
idx := LogDocument{
|
idx := LogDocument{
|
||||||
timestamp: when.Format(time.RFC3339),
|
Timestamp: when.Format(time.RFC3339),
|
||||||
msg: msg,
|
Msg: msg,
|
||||||
}
|
}
|
||||||
|
|
||||||
body, err := json.Marshal(idx)
|
body, err := json.Marshal(idx)
|
||||||
@ -87,8 +87,8 @@ func (el *esLogger) Flush() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type LogDocument struct {
|
type LogDocument struct {
|
||||||
timestamp string
|
Timestamp string `json:"timestamp"`
|
||||||
msg string
|
Msg string `json:"msg"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
Loading…
Reference in New Issue
Block a user