android java log code example

Example 1: android studio log usage

Log.e(String, String); //(error)
Log.w(String, String); //(warning)
Log.i(String, String); //(information)
Log.d(String, String); //(debug)
Log.v(String, String); //(verbose)

Example 2: android java log

Button: Log.i("Info", "Example of info (like Button Pressed)");
Plain Text: Log.i("Username", usernameEditText.getText().toString());

Example 3: how to use Log android studio Java

import android.util.Log;
Log.d("tagString", "messageString");

Tags:

Java Example