Difference between log methods

前端 未结 4 1492
忘掉有多难
忘掉有多难 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:34

    There is a difference in severity;

    Log.e() will simply log an error to the log with priority ERROR.
    

    Generally, use the Log.v() Log.d() Log.i() Log.w() and Log.e() methods.

    The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE. Verbose should never be compiled into an application except during development. Debug logs are compiled in but stripped at runtime. Error, warning and info logs are always kept.

提交回复
热议问题