Difference between log methods

前端 未结 4 1472
忘掉有多难
忘掉有多难 2021-01-03 01:14

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 so

4条回答
  •  北海茫月
    2021-01-03 01:29

    commonly used Log methods are five :

    Log.v () VERBOSE

    Log.d () DEBUG

    Log.i () INFO

    Log.w () WARN

    Log.e () ERROR

    1: 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 e

    4: 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

提交回复
热议问题