I’m working on building an Android app and I’m wondering what the best approach is to debugging like that of console.log in javascript
Advertisement
Answer
The Log class:
API for sending log output.
Generally, use the
Log.v()
Log.d()
Log.i()
Log.w()
andLog.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.
Outside of Android, System.out.println(String msg)
is used.