The introduction of Android Logging

Android logging (Source Google Images)

Android system uses a centralized system for all logs. Application programmers can also write custom log message.



To write a report log, you use android.util.Log class using the following method:

Log.v () – Log.d () – Log.i () – Log.w () – Log.e ()

They are sorted by relevance with Log.i () to be the least important. The first parameter of this method is the category and the second is the message. Android suggested that application is applied may not contain the logging code. Android development tools provide BuildConfig.DEBUG flag for this purpose.

if (x==true) {
        Log.e(Constants.TAG, “Welcome To Master                         Android App");
}

Source: Master Android (App)

Post Author: Study