Skip to content

Instantly share code, notes, and snippets.

@mustafa01ali
Created December 4, 2014 21:47
Show Gist options
  • Save mustafa01ali/027c79dcd6c917816e08 to your computer and use it in GitHub Desktop.
Save mustafa01ali/027c79dcd6c917816e08 to your computer and use it in GitHub Desktop.
Simple logging util for Android
import android.util.Log;
/**
* @author Mustafa Ali
*/
public class L {
private static final String LOG_TAG = "MyAwesomeApp";
private static final boolean IS_LOGGING_ENABLED = true;
public static void d(String msg) {
if (IS_LOGGING_ENABLED) {
Log.d(LOG_TAG, msg);
}
}
public static void e(String msg, Throwable t) {
if (IS_LOGGING_ENABLED) {
Log.e(LOG_TAG, msg, t);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment