From 703ab3f3665ccc6842e6af9873a00a681b522efb Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Sat, 31 Mar 2018 14:00:44 +0300 Subject: [PATCH] Fix core-sample logging --- .../src/net/osmand/PlatformUtil.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/OsmAndCore-sample/src/net/osmand/PlatformUtil.java b/OsmAndCore-sample/src/net/osmand/PlatformUtil.java index 11202adf74..e6e40a7499 100644 --- a/OsmAndCore-sample/src/net/osmand/PlatformUtil.java +++ b/OsmAndCore-sample/src/net/osmand/PlatformUtil.java @@ -31,6 +31,21 @@ public class PlatformUtil { this.fullName = name; 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 public void debug(Object message) { if(isDebugEnabled()){ @@ -115,6 +130,11 @@ public class PlatformUtil { 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 public void warn(Object message) { if(isWarnEnabled()){