Controlling Log Output Format
Log messages contain a number of metadata fields, in addition to the tag and priority. You can modify the output format for messages so that they display a specific metadata field. To do so, you use the -v
option and specify one of the supported output formats listed below.
brief
— Display priority/tag and PID of originating process (the default format).
process
— Display PID only.
tag
— Display the priority/tag only.
thread
— Display process:thread and priority/tag only.
raw
— Display the raw log message, with no other metadata fields.
time
— Display the date, invocation time, priority/tag, and PID of the originating process.
long
— Display all metadata fields and separate messages with a blank lines.
When starting logcat
, you can specify the output format you want by using the -v
option:
[adb] logcat [-v <format>]
Here's an example that shows how to generate messages in thread
output format:
adb logcat -v thread
Note that you can only specify one output format with the -v
option.