"adb logcat -v" Command - Log Format Control

This section describes how to use the 'adb logcat -v' command option to control the format of log entries. 'adb logcat -v long' dumps all data elements of each log entry.

If you want to control the format of each log entry is dumped, you need to use the "adb logcat -v <format>" option, which supports the following formats:

Here are 2 examples of using "adb logcat -v" format options:

1. To show all data elements of the log entry with the "-v long" format:

C:\herong>\local\android-sdk-windows\platform-tools\adb logcat -v long

[ 04-01 16:00:00.278   172:0xb0 D/dalvikvm ]
GC_CONCURRENT freed 3840K, 19% free 18438K/22727K, paused 6ms+6ms

[ 04-01 16:04:07.239    77:0x5e F/BatteryStatsImpl ]
problem reading network stats
java.lang.IllegalStateException: problem parsing idx 1
        at com.android.internal.net.NetworkStatsFactory.readNetwor...
        at com.android.internal.net.NetworkStatsFactory.readNetwor...
        at com.android.internal.os.BatteryStatsImpl.getNetworkStat...
        at com.android.internal.os.BatteryStatsImpl.access$100(Bat...

2. To show all data elements of the log entry with the "-v threadtime" format:

C:\herong>\local\android-sdk-windows\platform-tools\adb logcat \
   -v threadtime

04-01 16:05:35.099   158   163 D dalvikvm: GC_CONCURRENT freed 384...
04-01 16:06:41.048    77   153 W ThrottleService: unable to find s...
04-01 16:06:41.228    77    80 D dalvikvm: GC_CONCURRENT freed 489...
04-01 16:11:35.339    77    91 V BackupManagerService: Running a b...

See next tutorial on how to filtering log entries.

Last update: 2015.

Table of Contents

 About This Book

 Installing JDK 1.8 on Windows System

 Installation of Android SDK R24 and Emulator

 Installing Apache Ant 1.9 on Windows System

 Developing First Android Application - HelloAndroid

 Android Application Package (APK) Files

 Android Debug Bridge (adb) Tool

 Android File Systems

 Android 4.0.3 File Systems

 AboutAndroid - Application to Retrieve System Information

 android.app.Activity Class and Activity Lifecycle

 View Objects and Layout Resource Files

Using "adb logcat" Command for Debugging

 "adb logcat" Command - Displaying System Logs

 "adb logcat" Command Options and Log Buffers

"adb logcat -v" Command - Log Format Control

 "adb logcat" Command Arguments - Output Filters

 Using "adb logcat" Command to Track the Lifecycle of an Application

 Java Exceptions in AndroidRuntime Error Log

 Build Process and Package File Content

 Building Your Own Web Browser

 Android Command Line Shell

 Samsung Galaxy Tab 3 Mini Tablet

 USB Debugging Applications on Samsung Tablet

 Android Tablet - LG-V905R

 USB Debugging Applications on LG-V905R Tablet

 Android Phone - LG-P925g

 USB Debugging Applications on LG-P925g Phone

 Outdated Tutorials


 PDF Printing Version