Android adb logcat 时间过滤器

问题描述 投票:0回答:4

有谁知道如何过滤掉logcat('adb shell logcat'),以便它只显示当前日期和时间之后的日志语句?预先感谢。

android logging filtering adb logcat
4个回答
8
投票

当前日期和时间之后创建的活动?或者只记录当前时间之后的语句? 是不是像“adb logcat -c; adb logcat”那么简单


7
投票

使用

adb logcat -t "01-21 10:10:10.000"

这会给你日志

1 月 21 日 10.10.10.000 之后


1
投票

在启动 logcat 之前,首先将参数 -c 传递给它 在终端你会说

adb logcat -c
adb logcat

这会产生新鲜的原木。


0
投票
$ adb logcat -T 0

从现在开始,这将不断打印新消息。

其中

-T
(来自
adb logcat --help
)是:

  -T <count>                  Print only the most recent <count> lines
                              (does not imply -d).
© www.soinside.com 2019 - 2024. All rights reserved.