Java tutorial
//package com.java2s; import android.util.Log; public class Main { /** * @brief LOG TAG */ private static final String TAG = "BookmarkSyncHelper"; /** * @brief enable log print */ private static boolean enableLog = true; /** * @brief log utility */ static private void log(Exception e) { if (enableLog) Log.i(TAG, Log.getStackTraceString(e)); } /** * @brief log utility */ static private void log(String msg) { if (enableLog) Log.i(TAG, msg); } /** * @brief log utility */ static private void log(String format, Object arg1) { if (enableLog) Log.i(TAG, String.format(format, arg1)); } /** * @brief log utility */ static private void log(String format, Object arg1, Object arg2) { if (enableLog) Log.i(TAG, String.format(format, arg1, arg2)); } /** * @brief log utility */ static private void log(String format, Object arg1, Object arg2, Object arg3) { if (enableLog) Log.i(TAG, String.format(format, arg1, arg2, arg3)); } }