logcat essays

1, the command line syntax

adb logcat [option]  ...[filter-spec]

2. Options (option)

-b alternate log loading buffer

-c Clear selected buffers and exit. The default buffer set for the main, system and crash. To clear all buffers: -b all -c

-e <expr> log messages and output lines only <expr> match, this is a regular expression

-d log rolled out to the screen and exits

-f <filename> log message written to the output <filename>, default is stdout

-v <format> log messages output format, default threadtime

-c clear the entire log and exit

3, filter log

Filter expression: tag: priority ..... (mark: the lowest priority)

tag: message yard system components (e.g., view a view showing the system)

Priority: V D detailed debugging information I F W Warning E Error S silence critical error (highest priority and will not be any output)

E.g:

adb logcat ActivityManager:I MyApp:D *:S 

*: S represents all others are silent, are not displayed, this sentence represents only display mark ActivityManager and MyApp, and not less than ActivityManager priority information, the priority is not lower than debugging MyApp

4, the control log output format

Format: adb logcat [-v format]

brief: priority, marking, process PID

PID of the process: process

time: date, call time, PID priority, marking, process

5, view the backup log buffer (buffer)

Format: adb logcat [-b <buffer>]

  • radio: See buffer comprising a wireless device / telephone related messages.
  • events: View binary system event has been interpreted by the message buffer.
  • main: View of the main log buffer (default), the system does not contain a message log and a crash.
  • system: View the log buffer (the default).
  • crash: View the crash log buffer (the default).
  • all: View all buffers.
  • default: Reports  main, system and  crash buffers.

 

See: https://developer.android.google.cn/studio/command-line/logcat#alternativeBuffers

 

Guess you like

Origin www.cnblogs.com/saifei1125/p/12525966.html