Android日志操作logcat命令


adb logcat命令使用

Usage: logcat [options] [filterspecs]
options include:
  -s              Set default filter to silent.
                  Like specifying filterspec '*:S'
  -f <filename>   Log to file. Default is stdout
  -r <kbytes>     Rotate log every kbytes. Requires -f
  -n <count>      Sets max number of rotated logs to <count>, default 4
  -v <format>     Sets the log print format, where <format> is:

                      brief color long printable process raw tag thread
                      threadtime time usec

  -D              print dividers between each log buffer
  -c              clear (flush) the entire log and exit


用法: logcat [选项] [过滤条件]
选项包括:
  -s              设置默认过滤器为静默方式. 就像指定如下过滤器 '*:S'
  -f <filename>   记录到文件. 默认是标准输出
  -r <kbytes>     Rotate log every kbytes. Requires -f
  -n <count>      Sets max number of rotated logs to <count>, default 4
  -v <format>     设置日志输出格式, 其中 <format> 可以是:
                      brief color long printable process raw tag thread
                      threadtime time usec

  -D              在每个日志缓冲区之间打印分隔符
  -c              清除(刷新)整个日志并退出


# 打印logcat日志
adb logcat -v time

# 打印logcat日志到文件
adb logcat -v time | tee logcat.txt

# 清空Android日志log
adb logcat -c
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值