logcat的参数说明

本文详细介绍了 Android 开发中 logcat 工具的使用方法及各项参数含义,包括设置默认过滤级别、日志输出格式等高级功能。

附 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 to stdout  
  -r [<kbytes>]   Rotate log every kbytes. (16 if unspecified). Requires -f  
  -n <count>      Sets max number of rotated logs to <count>, default 4 
  -v <format>     Sets the log print format, where <format> is one of:  
 
                  brief process tag thread raw time long 
 
  -c              clear (flush) the entire log and exit  
  -d              dump the log and then exit (don't block)  
  -g              get the size of the log's ring buffer and exit  
  -b <buffer>     request alternate ring buffer, defaults to 'main'  
filterspecs are a series of  
  <tag>[:priority]  
 
where <tag> is a log component tag (or * for all) and priority is:  
  V    Verbose  
  D    Debug  
  I    Info  
  W    Warn  
  E    Error  
  F    Fatal  
  S    Silent (supress all output)  
 
'*' means '*:d' and <tag> by itself means <tag>:v  
 
If not specified on the commandline, filterspec is set from ANDROID_LOG_TAG  
If no filterspec is found, filter defaults to '*:I'  
 
If not specified with -v, format is set from ANDROID_PRINTF_LOG  
or defaults to "brief" 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值