Skip to content
Search

Android.util.Log

lastmod 2018-08-17created 2016-11-291 edits

Android provides its own way of logging. App developers can write logs with the provided methods, and the logs written this way can be viewed with logcat in the adb tool.

To write logs from an app, use the Log class. The logging methods are as follows.

  • v: Verbose
  • d: Debug
  • i: Information
  • w: Warninig
  • e: Error

Simple example

private static final String TAG = "MyActivity";
Log.v(TAG, "index=" + i);

See also

Favorite site