Browse Source

update es 写入失败日志

dev
lucas 1 month ago
parent
commit
9edb716f5a
  1. 2
      dbHelper/elasticsearchHelper.go

2
dbHelper/elasticsearchHelper.go

@ -190,7 +190,7 @@ func (the *ESHelper) BulkWrite(index, reqBody string) {
if res.StatusCode != 200 && res.StatusCode != 201 { if res.StatusCode != 200 && res.StatusCode != 201 {
respBody, _ := io.ReadAll(res.Body) respBody, _ := io.ReadAll(res.Body)
log.Panicf("es 写入失败,err=%s", string(respBody)) log.Panicf("es 写入失败,err=%s \n body=%s", string(respBody), reqBody)
} }
//log.Printf("es 写入[%s],字符长度=%d,完成", index, len(reqBody)) //log.Printf("es 写入[%s],字符长度=%d,完成", index, len(reqBody))

Loading…
Cancel
Save