Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Log;

public class Main {
    private static boolean isDebug = true;
    static String mTag = "LogUtils";

    public static void debug(String msg) {
        if (isDebug) {
            Log.d(mTag, msg);
        }
    }

    public static void d(String msg) {
        if (isDebug) {
            Log.d(mTag, msg);
        }
    }

    public static void d(String tag, String msg) {
        if (isDebug) {
            if (tag == null || "".equalsIgnoreCase(tag.trim())) {
                tag = mTag;
            }
            Log.d(tag, msg);
        }
    }
}