diff options
author | steckbrief <steckbrief@chefmail.de> | 2015-12-10 20:01:50 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2015-12-10 20:01:50 +0100 |
commit | a7454223008c78dcf5e0ff727bca64241f99daa1 (patch) | |
tree | f9ab1f2834743fc1cf9970636c0862d209c51c5e /libs/thedevstacklogcat/src/main/java/de/thedevstack/android/logcat/Logging.java | |
parent | eb5a7a5392ec93976d91d5576a3496ceac473d03 (diff) |
Moved logcat to a module, increased error robustness for loading last messages
Diffstat (limited to '')
-rw-r--r-- | libs/thedevstacklogcat/src/main/java/de/thedevstack/android/logcat/Logging.java (renamed from src/main/java/de/thedevstack/conversationsplus/utils/Logging.java) | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/Logging.java b/libs/thedevstacklogcat/src/main/java/de/thedevstack/android/logcat/Logging.java index 40ec66a0..6af7a70e 100644 --- a/src/main/java/de/thedevstack/conversationsplus/utils/Logging.java +++ b/libs/thedevstacklogcat/src/main/java/de/thedevstack/android/logcat/Logging.java @@ -1,12 +1,36 @@ -package de.thedevstack.conversationsplus.utils; +package de.thedevstack.android.logcat; import android.util.Log; /** - * Created by tzur on 20.11.2015. + * Utility class to prefix every log tag. + * This can be used for better filtering in the log cat output activity. */ public class Logging { - protected static final String LOG_TAG_PREFIX = "thedevstack."; + /** + * The prefix for every log tag. + */ + protected static String LOG_TAG_PREFIX = "thedevstack."; + + /** + * Changes the default log tag prefix. + * The default value is <code>thedevstack.</code> + * @param logTagPrefix the new log tag prefix to use + */ + public static void initLogTagPrefix(String logTagPrefix) { + if (null != logTagPrefix) { + LOG_TAG_PREFIX = logTagPrefix; + } + } + + /** + * Returns the current log tag prefix. + * @return value of Logging.LOG_TAG_PREFIX + */ + public static String getLogTagPrefix() { + return LOG_TAG_PREFIX; + } + /** * Send a {@link Log#VERBOSE} log message. * @param tag Used to identify the source of a log message. It usually identifies |