Sometimes to find the error in android using logcat not enough for us to give an error or debugging information we want. Therefore, we can use the Log class to describe the error or debug what we want.
code above is used to describe the TAG Error that we use. Suppose that tag to describe the "Sending Email" and you can create a new TAG variable according to your needs.
Now you add the log information in that class with the following code
Log is a class for describing error. "i" is used error in the show. There are some errors that we can describe.
ASSERT
Priority constant for the println method.
DEBUG
Priority constant for the println method; use Log.d.
ERROR
Priority constant for the println method; use Log.e.
INFO
Priority constant for the println method; use Log.i.
VERBOSE
Priority constant for the println method; use Log.v.
WARN
Priority constant for the println method; use Log.w.
private static final String TAG = "Sending Email";Code above is used to describe the TAG Error that we use. Suppose that tag to describe the "Sending Email" and you can create a new TAG variable according to your needs
code above is used to describe the TAG Error that we use. Suppose that tag to describe the "Sending Email" and you can create a new TAG variable according to your needs.
Now you add the log information in that class with the following code
Log.i (TAG, "Success");
Log is a class for describing error. "i" is used error in the show. There are some errors that we can describe.
ASSERT
Priority constant for the println method.
DEBUG
Priority constant for the println method; use Log.d.
ERROR
Priority constant for the println method; use Log.e.
INFO
Priority constant for the println method; use Log.i.
VERBOSE
Priority constant for the println method; use Log.v.
WARN
Priority constant for the println method; use Log.w.
0 komentar:
Posting Komentar