change: update logs

This commit is contained in:
lilong.129
2023-08-06 14:27:30 +08:00
parent 6e8c0005c0
commit 9a7848a142
7 changed files with 65 additions and 72 deletions

View File

@@ -73,7 +73,7 @@ func (ad *adbDriver) WindowSize() (size Size, err error) {
var resolution string
sizeList := strings.Split(output, "\n")
log.Info().Msgf("window size: %v", sizeList)
log.Trace().Msgf("window size: %v", sizeList)
for _, size := range sizeList {
if strings.Contains(size, matchedSizeType) {
resolution = strings.Split(size, ": ")[1]

View File

@@ -8,11 +8,11 @@ import (
"image"
"image/color"
"io/ioutil"
"log"
"math"
"os"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"gocv.io/x/gocv"
"github.com/httprunner/httprunner/v4/hrp/internal/builtin"
@@ -409,14 +409,14 @@ func getMatchingLocation(matImage gocv.Mat, matTpl gocv.Mat, threshold float32,
val, loc = getValLoc(minVal, maxVal, minLoc, maxLoc, matchMode)
if debug == DmEachMatch {
log.Println(fmt.Sprintf(dmOutputMsg, val, threshold))
log.Debug().Msg(fmt.Sprintf(dmOutputMsg, val, threshold))
}
if val >= threshold {
return loc, nil
} else {
if debug == DmNotMatch {
log.Println(fmt.Sprintf(dmOutputMsg, val, threshold))
log.Debug().Msg(fmt.Sprintf(dmOutputMsg, val, threshold))
}
return image.Point{}, errors.New("no such target search image")
}

View File

@@ -170,12 +170,12 @@ func newVEDEMImageService() (*veDEMImageService, error) {
// veDEMImageService implements IImageService interface
// actions:
//
// ocr - get ocr texts
// upload - get image uploaded url
// liveType - get live type
// popup - get popup windows
// close - get close popup
// ui - get ui position by type(s)
// ocr - get ocr texts
// upload - get image uploaded url
// liveType - get live type
// popup - get popup windows
// close - get close popup
// ui - get ui position by type(s)
type veDEMImageService struct{}
type (
actionOptions []string