Created
September 2, 2012 05:38
-
-
Save kojiokb/3595115 to your computer and use it in GitHub Desktop.
デバッグビルド時のみログを出力する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.Log; | |
public class DebugLog { | |
public static void v(String tag, String message) { | |
if (BuildConfig.DEBUG) { | |
Log.v(tag, message); | |
} | |
} | |
public static void d(String tag, String message) { | |
if (BuildConfig.DEBUG) { | |
Log.d(tag, message); | |
} | |
} | |
public static void i(String tag, String message) { | |
if (BuildConfig.DEBUG) { | |
Log.i(tag, message); | |
} | |
} | |
public static void w(String tag, String message) { | |
if (BuildConfig.DEBUG) { | |
Log.w(tag, message); | |
} | |
} | |
public static void e(String tag, String message) { | |
if (BuildConfig.DEBUG) { | |
Log.e(tag, message); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment