January 2017
Beginner to intermediate
624 pages
22h 42m
English
When you use the android.util.Log class to send log messages, you control not only the content of a message, but also a level that specifies how important the message is. Android supports five log levels, shown in Table 3.2. Each level has a corresponding method in the Log class. Sending output to the log is as simple as calling the corresponding Log method.
Table 3.2 Log levels and methods
| Log level | Method | Used for |
|---|---|---|
|
ERROR |
Log.e(…) |
errors |
|
WARNING |
Log.w(…) |
warnings |
|
INFO |
Log.i(…) |
informational messages |
|
DEBUG |
Log.d(…) |
debug output (may be filtered out) |
|
VERBOSE |
Log.v(…) |
development only |
In addition, each of the logging methods has two ...
Read now
Unlock full access