Skip to content

Instantly share code, notes, and snippets.

@tunjos
Last active August 29, 2015 14:19
Show Gist options
  • Save tunjos/0b3402215680cfbfa7d0 to your computer and use it in GitHub Desktop.
Save tunjos/0b3402215680cfbfa7d0 to your computer and use it in GitHub Desktop.
LogHelper Class
import android.content.Context;
import android.util.Log;
import android.widget.Toast;
public class LogHelper {
private static final String LOG_TAG = MyConstants.APP_NAME;
public static void log(String message) {
Log.d(LOG_TAG, message);
}
public static void error(String message) {
Log.e(LOG_TAG, message);
}
public static void toast(Context context, String message) {
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment