1. Log information level
Log.v - VERBOSE: Black
Log.d - DEBUG: Blue
Log.i- INFO: Green
Log.w- WARN: Orange
Log.e- ERROR: red
from top to bottom successive level increase
2. Filter: Specifies the label, the specified level
adb logcat [TAG: LEVEL] [ TAG: LEVEL] ...
Tags TAG: log output specification required during label
Log.v ( "the Test", info);
the LEVEL:
can be selected: [VDIWES] in which a
TAG: X action is: greater than the output of the tag information tAG-log of X is, for example:.
the adb logcat Test: I
output Test I and one or more levels of log I, including i, w, e
Note:
(1) can specify a plurality of [the TAG: the LEVEL]
(2) Level: S is expressed as the log is not output the label should not be greater than the level log S
(3) [TAG: LEVEL] does not affect other tags log, so if you want to shield other log use *: S
adb logcat the Test: the I *: S
3. Use grep regular expression filters
Referring grep grep regular expression regular expression
adb logcat | grep -E '^ [ VDE] / (TAG1 | TAG2)'
4. While the file to the screen and tee
Want to save the log to a file, if the IO redirection, you can not output to the screen, you can solve this problem using the tee command
adb logcat | grep -E '^ [ VDE] / (TAG1 | TAG2)' | tee my.log
Address: https://blog.csdn.net/zhuhai__yizhi/article/details/47708489