diff options
Diffstat (limited to 'main/src/cgeo/geocaching/utils/Log.java')
| -rw-r--r-- | main/src/cgeo/geocaching/utils/Log.java | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/utils/Log.java b/main/src/cgeo/geocaching/utils/Log.java index 6346b87..9f5bd3d 100644 --- a/main/src/cgeo/geocaching/utils/Log.java +++ b/main/src/cgeo/geocaching/utils/Log.java @@ -1,43 +1,52 @@ package cgeo.geocaching.utils; -import cgeo.geocaching.Settings; final public class Log { private static final String TAG = "cgeo"; + private static boolean isDebug = true; + + public static boolean isDebug() { + return isDebug; + } + + public static void setDebugUnsaved(boolean isDebug) { + Log.isDebug = isDebug; + } + public static void v(final String msg) { - if (Settings.isDebug()) { + if (isDebug) { android.util.Log.v(TAG, msg); } } public static void v(final String msg, final Throwable t) { - if (Settings.isDebug()) { + if (isDebug) { android.util.Log.v(TAG, msg, t); } } public static void d(final String msg) { - if (Settings.isDebug()) { + if (isDebug) { android.util.Log.d(TAG, msg); } } public static void d(final String msg, final Throwable t) { - if (Settings.isDebug()) { + if (isDebug) { android.util.Log.d(TAG, msg, t); } } public static void i(final String msg) { - if (Settings.isDebug()) { + if (isDebug) { android.util.Log.i(TAG, msg); } } public static void i(final String msg, final Throwable t) { - if (Settings.isDebug()) { + if (isDebug) { android.util.Log.i(TAG, msg, t); } } |
