Fix core-sample logging

This commit is contained in:
Alexey Kulish 2018-03-31 14:00:44 +03:00
parent 208830bbf8
commit 703ab3f366

View file

@ -31,6 +31,21 @@ public class PlatformUtil {
this.fullName = name; this.fullName = name;
this.name = fullName.substring(fullName.lastIndexOf('.') + 1); this.name = fullName.substring(fullName.lastIndexOf('.') + 1);
} }
@Override
public void trace(Object message) {
if(isTraceEnabled()){
android.util.Log.d(TAG, name + " " + message); //$NON-NLS-1$
}
}
@Override
public void trace(Object message, Throwable t) {
if(isTraceEnabled()){
android.util.Log.d(TAG, name + " " + message, t); //$NON-NLS-1$
}
}
@Override @Override
public void debug(Object message) { public void debug(Object message) {
if(isDebugEnabled()){ if(isDebugEnabled()){
@ -115,6 +130,11 @@ public class PlatformUtil {
return android.util.Log.isLoggable(TAG, android.util.Log.WARN); return android.util.Log.isLoggable(TAG, android.util.Log.WARN);
} }
@Override
public boolean isTraceEnabled() {
return android.util.Log.isLoggable(TAG, android.util.Log.VERBOSE);
}
@Override @Override
public void warn(Object message) { public void warn(Object message) {
if(isWarnEnabled()){ if(isWarnEnabled()){