Tutorial by Examples

It is helpful to filter the logcat output because there are many messages which are not of interest. To filter the output, open the "Android Monitor" and click on the drop down on the top-right and select Edit Filter Configuration Now you can add custom filters to show messages which ar...
Any quality Android application will keep track of what it's doing through application logs. These logs allow easy debugging help for the developer to diagnose what's going on with the application. Full Android Documentation can be found here, but a summary follows: Basic Logging The Log class...
This is a nice trick to add a link to code, so it will be easy to jump to the code that issued the log. With the following code, this call: MyLogger.logWithLink("MyTag","param="+param); Will result in: 07-26...012/com.myapp D/MyTag: MyFrag:onStart(param=3) (MyFrag.java:236...
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 And...
Android Studio's Live templates can offer quite a few shortcuts for quick logging. To use Live templates, all you need to do is to start typing the template name, and hit TAB or enter to insert the statement. Examples: logi → turns into → android.util.Log.i(TAG, "$METHOD_NAME$: $content$&q...
Hide/show printed information: Control verbosity of the logging: Disable/enable opening log window when starting run/debug application
In order to clear (flush) the entire log: adb logcat -c

Page 1 of 1