Last active
August 29, 2015 14:07
-
-
Save mitchwongho/e130fc22cde13868cb55 to your computer and use it in GitHub Desktop.
Convenience android.util.Log wrapper
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
| package com.utils; | |
| /** | |
| * Convenience Log wrapper | |
| */ | |
| public class Log { | |
| public static void d( final String tag, final String msg, final Object... vargs ) { | |
| android.util.Log.d( tag, String.format( msg, vargs ) ); | |
| } | |
| public static void d( final String tag, final String msg, final Throwable throwable, final Object... vargs ) { | |
| android.util.Log.d( tag, String.format( msg, vargs ), throwable ); | |
| } | |
| public static void w( final String tag, final String msg, final Object... vargs ) { | |
| android.util.Log.w( tag, String.format( msg, vargs ) ); | |
| } | |
| public static void w( final String tag, final String msg, final Throwable throwable, final Object... vargs ) { | |
| android.util.Log.w( tag, String.format( msg, vargs ), throwable ); | |
| } | |
| public static void e( final String tag, final String msg, final Object... vargs ) { | |
| android.util.Log.e( tag, String.format( msg, vargs ) ); | |
| } | |
| public static void e( final String tag, final String msg, final Throwable throwable, final Object... vargs ) { | |
| android.util.Log.e( tag, String.format( msg, vargs ), throwable ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment