User Tools

Site Tools


android_learning:using_the_system_log

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
android_learning:using_the_system_log [2016/04/24 03:34] mithatandroid_learning:using_the_system_log [2016/04/24 04:13] (current) mithat
Line 1: Line 1:
 ====== Using the system log ====== ====== Using the system log ======
  
-You can use the system log to output debug information to the console. ''Log.d(//tag//, //message//)'' lets you output anything you want to the console. Example:<code java>+''Log.d(//tag//, //message//)'' lets you output anything you want to the console when you run the app in debug mode. You have to import ''android.util.Log'' to use ''Log.d''. 
 + 
 +Example:<code java>
 Log.d("MyMessages", "Hello, world."); Log.d("MyMessages", "Hello, world.");
 </code> </code>
  
-You have to import import ''android.util.Log'' to use ''Log.d''.+In Android Studio, when you run your app in debug mode (//Run > Debug 'app'// or the bug icon in the toolbar or Shift+F9) you should see a new pane on the bottom panel: **6: Android monitor**Your messages will show up there---along with a bunch of others.
  
-In Android Studio, when you run your app in debug mode (//Run > Debug 'app'// or the bug icon in the toolbar or Shift+F9) you should see a new pane on the bottom panel: **6: Android monitor**. Your messages will show up there---along with a bunch of others. You can filter out everything except what you have tagged with your //tag// by selecting "Edit filter configuration" from dropdown at the far right of the **6: Android monitor** pane and adding your //tag// to the "Log Tag" field. You may have to uncheck the "Regex" box.+You can filter out everything except what you have tagged with your //tag// by selecting "Edit filter configuration" from dropdown at the far right of the **6: Android monitor** pane and adding your //tag// to the "Log Tag" field. You may have to uncheck the "Regex" box.
  
 For more info, see [[https://developer.android.com/tools/debugging/debugging-studio.html|Debugging with Android Studio]] at the Android Developers site. For more info, see [[https://developer.android.com/tools/debugging/debugging-studio.html|Debugging with Android Studio]] at the Android Developers site.
android_learning/using_the_system_log.1461468857.txt.gz · Last modified: 2016/04/24 03:34 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki