Created
April 18, 2016 09:56
-
-
Save rhonyabdullah/97985d747e1f57ad35d61a0bdc5a28cc to your computer and use it in GitHub Desktop.
Android logger class
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.content.Context; | |
import android.util.Log; | |
import android.widget.Toast; | |
/** | |
* Created by rhony on 18/04/16. | |
*/ | |
public class Logger { | |
public static void log_i(String className, String message) { | |
Log.i("TAG", " class : "+className+" \nMessage : "+message); | |
} | |
public static void log_e(String className, String message) { | |
Log.e("TAG", " class : "+className+" \nError : "+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