change: update logcat args

This commit is contained in:
debugtalk
2023-02-13 21:47:53 +08:00
parent 515623ea8b
commit cca4bd7ae3
2 changed files with 10 additions and 2 deletions

View File

@@ -311,12 +311,13 @@ func (l *AdbLogcat) CatchLogcat() (err error) {
}
// clear logcat
if err = myexec.RunCommand("adb", "-s", l.serial, "logcat", "-c"); err != nil {
if err = myexec.RunCommand("adb", "-s", l.serial, "logcat", "--clear"); err != nil {
return
}
// start logcat
l.cmd = myexec.Command("adb", "-s", l.serial, "logcat", "-v", "time", "-s", "iesqaMonitor:V")
l.cmd = myexec.Command("adb", "-s", l.serial,
"logcat", "--format", "time", "-s", "iesqaMonitor:V")
l.cmd.Stderr = l.logBuffer
l.cmd.Stdout = l.logBuffer
if err = l.cmd.Start(); err != nil {