Essential Android Logging and using Logcat edit forum

Using the Logcat

Logcat is a command-line tool that dumps a log of system messages, including stack traces when the device throws an error and messages that you have written from your app with the Log class.

The Logcat output can be displayed within Android Studio’s Android Monitor or with adb command line.

In Android Studio

Show by clicking the “Android Monitor” icon: Or by pressing Alt+6 on Windows/Linux or CMD+6 on Mac.

via command line:

Simple usage:

$ adb logcat

With timestamps:

$ adb logcat -v time

Filter on specific text:

$ adb logcat -v time | grep 'searchtext'

There are many options and filters available to command line logcat, documented here. A simple but useful example is the following filter expression that displays all log messages with priority level “error”, on all tags:

$ adb logcat *:E

Table Of Contents
51 Logging and using Logcat
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close