diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2012-04-20 10:19:25 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2012-04-20 10:19:25 +0200 |
| commit | 7e7255a1bedafbeb797429014e721d1a01f006e2 (patch) | |
| tree | 3fe74dcb4d299dd786e5ec4354ec4f57b4e6225a /main/src/cgeo/geocaching/utils/Log.java | |
| parent | beb9dbe92d9f119d1c4612c7a1a26360b6aabd18 (diff) | |
| parent | 368fef69587fbddbf90ea1dfd00174847e8855c4 (diff) | |
| download | cgeo-7e7255a1bedafbeb797429014e721d1a01f006e2.zip cgeo-7e7255a1bedafbeb797429014e721d1a01f006e2.tar.gz cgeo-7e7255a1bedafbeb797429014e721d1a01f006e2.tar.bz2 | |
Merge branch 'fix-1347' into upstream
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); } } |
