January 2012
Intermediate to advanced
282 pages
7h 4m
English
As we have seen in many listings already, you can use the Log class to print out messages to LogCat. In addition to the Java traditional logging mechanism such as System.out.println(), Android defines six log levels, each having its own methods:
For example, a call to Log.v(TAG, “my message”) is equivalent to a call to Log.println(Log.VERBOSE, TAG, “my message”).
NOTE: The Log.wtf() methods were introduced in API level 8, but Log.ASSERT exists since API level 1. If you want to use the ASSERT log level but want to guarantee compatibility with older Android devices, use Log.println(Log.ASSERT, …) instead of Log.wtf(…).
You can then use LogCat in ...