mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
add timestamp to java logs
This commit is contained in:
parent
b6a151a7e8
commit
26d4056a76
1 changed files with 5 additions and 1 deletions
|
@ -19,6 +19,7 @@ import android.app.Activity;
|
|||
import android.app.Dialog;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.text.format.Time;
|
||||
|
||||
import org.eehouse.android.xw4.jni.*;
|
||||
import org.eehouse.android.xw4.jni.JNIThread.*;
|
||||
|
@ -26,12 +27,15 @@ import org.eehouse.android.xw4.jni.JNIThread.*;
|
|||
public class Utils {
|
||||
static final String TAG = "EJAVA";
|
||||
private static JNIThread s_jniThread = null;
|
||||
private static Time s_time = new Time();
|
||||
|
||||
private Utils() {}
|
||||
|
||||
public static void logf( String format ) {
|
||||
s_time.setToNow();
|
||||
String time = s_time.format("%M:%S");
|
||||
long id = Thread.currentThread().getId();
|
||||
Log.d( TAG, id + ": " + format );
|
||||
Log.d( TAG, time + "-" + id + "-" + format );
|
||||
} // logf
|
||||
|
||||
public static void logf( String format, Object[] args ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue