change: update logcat args

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

View File

@@ -321,6 +321,13 @@ func (ad *adbDriver) IsHealthy() (healthy bool, err error) {
func (ad *adbDriver) StartCaptureLog(identifier ...string) (err error) {
log.Info().Msg("start adb log recording")
// clear logcat
if _, err = ad.adbClient.RunShellCommand("logcat", "--clear"); err != nil {
return err
}
// start logcat
err = ad.logcat.CatchLogcat()
if err != nil {
err = errors.Wrap(code.AndroidCaptureLogError,