Android Tutorials - Herong's Tutorial Examples - v3.05, by Herong Yang
"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.
Table of Contents
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
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
Samsung Galaxy Tab 3 Mini Tablet
USB Debugging Applications on Samsung Tablet
USB Debugging Applications on LG-V905R Tablet