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