logcat命令使用方法和查看android系统日志缓冲区内容的方法

2019-12-10 20:09:33王振洲

options include:
选项包含:
  -s              Set default filter to silent.
                  Like specifying filterspec '*:S'
                  设置默认过滤为无声的。
                  像指定过滤说明为 *:S ,见下面 过滤说明 部份详述

  -f <filename>   Log to file. 
                  Default to stdout
                  输出日志到文件。
                  默认为 stdout 

  -r [<kbytes>]   Rotate log every kbytes. 
                  (16 if unspecified). 
                  Requires -f
                  设置环形日志缓冲区的kbytes。
                  默认值为16。
                  需要和 -f 选项一起使用

  -n <count>      Sets max number of rotated logs to <count>, default 4
                  设置环形日志缓冲区的最大数目,默认值是4,需要和 -r 选项一起使用

  -v <format>     Sets the log print format, where <format> is one of:
                  设置 log 的打印格式,  格式有如下主要7种:(不能组合使用)

                  brief 
                  process 
                  tag 
                  thread