aboutsummaryrefslogtreecommitdiffstats
path: root/libs/thedevstacklogcat/src/main/java/de/thedevstack/android/logcat/Logging.java
diff options
context:
space:
mode:
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