I am new in android and i print log-cat using:
Log.w("Tag", "String text");
and log text print but after searching for a time i find some more way to print logcat like:
Log.v()
Log.d()
and now i am confuse in these methods.
Which is the best method for print log-cat and how may method for print lagcat and also what is the main difference between them?
commonly used
Logmethods are five :Log.v ()VERBOSELog.d ()DEBUGLog.i ()INFOLog.w ()WARNLog.e ()ERROR1:
Log.v– debugging color black , and any messages will be output, where v represents the verbose verbose mean, usually is Log.v (“”, “”);2:
Log.d– the output color is blue , the only output debug debugging meaning, but he would output the upper filter up through of DDMS Logcat label to select.3:
Log.i– output color is green , general tips, news information, it does not the output Log.v Log.d information, but will display the information of i, w and e4:
Log.w– mean orange , can be seen as a warning The warning, in general we need to optimize the Android code, and will output it after Log.e.5:
Log.e– is red , you can think of error error here only to show the red error message, these errors we need careful analysis.For more information:
http://developer.android.com/guide/developing/debugging/debugging-log.html