mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-23 07:27:22 +01:00
include flavor in logged TAG
Tired of not being to tell variants' logs apart.
This commit is contained in:
parent
a86250ca36
commit
b58e121246
1 changed files with 6 additions and 5 deletions
|
@ -23,21 +23,23 @@ package org.eehouse.android.xw4;
|
|||
import java.util.Formatter;
|
||||
|
||||
public class Log {
|
||||
private static final String PRE_TAG = BuildConfig.FLAVOR + ":";
|
||||
|
||||
public static void d( String tag, String fmt, Object... args ) {
|
||||
String str = new Formatter().format( fmt, args ).toString();
|
||||
android.util.Log.d( tag, str );
|
||||
android.util.Log.d( PRE_TAG + tag, str );
|
||||
}
|
||||
public static void w( String tag, String fmt, Object... args ) {
|
||||
String str = new Formatter().format( fmt, args ).toString();
|
||||
android.util.Log.w( tag, str );
|
||||
android.util.Log.w( PRE_TAG + tag, str );
|
||||
}
|
||||
public static void e( String tag, String fmt, Object... args ) {
|
||||
String str = new Formatter().format( fmt, args ).toString();
|
||||
android.util.Log.e( tag, str );
|
||||
android.util.Log.e( PRE_TAG + tag, str );
|
||||
}
|
||||
public static void i( String tag, String fmt, Object... args ) {
|
||||
String str = new Formatter().format( fmt, args ).toString();
|
||||
android.util.Log.i( tag, str );
|
||||
android.util.Log.i( PRE_TAG + tag, str );
|
||||
}
|
||||
|
||||
public static void ex( String tag, Exception exception )
|
||||
|
@ -45,5 +47,4 @@ public class Log {
|
|||
w( tag, "Exception: %s", exception.toString() );
|
||||
DbgUtils.printStack( tag, exception.getStackTrace() );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue