change: replace gadb log

This commit is contained in:
debugtalk
2022-12-26 16:49:43 +08:00
parent 869a1b59c3
commit 9b081bff8b
7 changed files with 37 additions and 87 deletions
+7 -3
View File
@@ -4,10 +4,14 @@ import (
"fmt"
"strconv"
"strings"
"github.com/rs/zerolog/log"
)
const AdbServerPort = 5037
const AdbDaemonPort = 5555
const (
AdbServerPort = 5037
AdbDaemonPort = 5555
)
type Client struct {
host string
@@ -86,7 +90,7 @@ func (c Client) DeviceList() (devices []Device, err error) {
fields := strings.Fields(line)
if len(fields) < 5 || len(fields[0]) == 0 {
debugLog(fmt.Sprintf("can't parse: %s", line))
log.Error().Str("line", line).Msg("get unexpected line")
continue
}