mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-08 01:09:44 +08:00
change: print ocr service logID when success
This commit is contained in:
@@ -93,14 +93,17 @@ func (s *veDEMOCRService) getOCRResult(imageBuf *bytes.Buffer) ([]OCRResult, err
|
|||||||
// retry 3 times
|
// retry 3 times
|
||||||
for i := 1; i <= 3; i++ {
|
for i := 1; i <= 3; i++ {
|
||||||
resp, err = client.Do(req)
|
resp, err = client.Do(req)
|
||||||
if err == nil {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
var logID string
|
var logID string
|
||||||
if resp != nil {
|
if resp != nil {
|
||||||
logID = getLogID(resp.Header)
|
logID = getLogID(resp.Header)
|
||||||
}
|
}
|
||||||
|
if err == nil {
|
||||||
|
log.Debug().
|
||||||
|
Str("X-TT-LOGID", logID).
|
||||||
|
Int("imageBufSize", size).
|
||||||
|
Msg("request OCR service success")
|
||||||
|
break
|
||||||
|
}
|
||||||
log.Error().Err(err).
|
log.Error().Err(err).
|
||||||
Str("X-TT-LOGID", logID).
|
Str("X-TT-LOGID", logID).
|
||||||
Int("imageBufSize", size).
|
Int("imageBufSize", size).
|
||||||
|
|||||||
Reference in New Issue
Block a user