Index: base/android/java/src/org/chromium/base/Log.java |
diff --git a/base/android/java/src/org/chromium/base/Log.java b/base/android/java/src/org/chromium/base/Log.java |
index 4c79a4d507f3f5c255c5df224a12ea0282f0a992..c6cc3503827ccc62c8be3ba6e479b650e847f971 100644 |
--- a/base/android/java/src/org/chromium/base/Log.java |
+++ b/base/android/java/src/org/chromium/base/Log.java |
@@ -29,7 +29,7 @@ |
* |
* Usage: |
* <pre> |
- * private static final String TAG = Log.makeTag("Group"); |
+ * private static final String TAG = "cr.Group"; |
* |
* private void myMethod(String awesome) { |
* Log.i(TAG, "My %s message.", awesome); |
@@ -45,12 +45,10 @@ |
* |
* Set the log level for a given group: |
* <pre> |
- * $ adb shell setprop log.tag.chromium.Group VERBOSE |
+ * $ adb shell setprop log.tag.cr.Group VERBOSE |
* </pre> |
*/ |
public class Log { |
- private static final String BASE_TAG = "cr"; |
- |
/** Convenience property, same as {@link android.util.Log#ASSERT}. */ |
public static final int ASSERT = android.util.Log.ASSERT; |
@@ -98,10 +96,12 @@ private static String formatLogWithStack(String messageTemplate, Object... param |
* |
* @see android.util.Log#isLoggable(String, int) |
* @throws IllegalArgumentException if the tag is too long. |
+ * @deprecated Directly use a string (e.g. "cr.Tag") in your class. See http://crbug.com/485772 |
*/ |
+ @Deprecated |
public static String makeTag(String groupTag) { |
- if (TextUtils.isEmpty(groupTag)) return BASE_TAG; |
- String tag = BASE_TAG + "." + groupTag; |
+ if (TextUtils.isEmpty(groupTag)) return "cr"; |
+ String tag = "cr." + groupTag; |
if (tag.length() > 23) { |
throw new IllegalArgumentException( |
"The full tag (" + tag + ") is longer than 23 characters."); |
@@ -121,9 +121,7 @@ public static boolean isLoggable(String tag, int level) { |
* than 7 parameters, consider building your log message using a function annotated with |
* {@link NoSideEffects}. |
* |
- * @param tag Used to identify the source of a log message. Should be created using |
- * {@link #makeTag(String)}. |
- * |
+ * @param tag Used to identify the source of a log message. |
* @param messageTemplate The message you would like logged. It is to be specified as a format |
* string. |
* @param args Arguments referenced by the format specifiers in the format string. If the last |
@@ -193,9 +191,7 @@ public static void v(String tag, String messageTemplate, Object arg1, Object arg |
* than 7 parameters, consider building your log message using a function annotated with |
* {@link NoSideEffects}. |
* |
- * @param tag Used to identify the source of a log message. Should be created using |
- * {@link #makeTag(String)}. |
- * |
+ * @param tag Used to identify the source of a log message. |
* @param messageTemplate The message you would like logged. It is to be specified as a format |
* string. |
* @param args Arguments referenced by the format specifiers in the format string. If the last |
@@ -259,8 +255,7 @@ public static void d(String tag, String messageTemplate, Object arg1, Object arg |
/** |
* Sends an {@link android.util.Log#INFO} log message. |
* |
- * @param tag Used to identify the source of a log message. Should be created using |
- * {@link #makeTag(String)}. |
+ * @param tag Used to identify the source of a log message. |
* @param messageTemplate The message you would like logged. It is to be specified as a format |
* string. |
* @param args Arguments referenced by the format specifiers in the format string. If the last |
@@ -281,8 +276,7 @@ public static void i(String tag, String messageTemplate, Object... args) { |
/** |
* Sends a {@link android.util.Log#WARN} log message. |
* |
- * @param tag Used to identify the source of a log message. Should be created using |
- * {@link #makeTag(String)}. |
+ * @param tag Used to identify the source of a log message. |
* @param messageTemplate The message you would like logged. It is to be specified as a format |
* string. |
* @param args Arguments referenced by the format specifiers in the format string. If the last |
@@ -303,8 +297,7 @@ public static void w(String tag, String messageTemplate, Object... args) { |
/** |
* Sends an {@link android.util.Log#ERROR} log message. |
* |
- * @param tag Used to identify the source of a log message. Should be created using |
- * {@link #makeTag(String)}. |
+ * @param tag Used to identify the source of a log message. |
* @param messageTemplate The message you would like logged. It is to be specified as a format |
* string. |
* @param args Arguments referenced by the format specifiers in the format string. If the last |
@@ -329,8 +322,7 @@ public static void e(String tag, String messageTemplate, Object... args) { |
* |
* @see android.util.Log#wtf(String, String, Throwable) |
* |
- * @param tag Used to identify the source of a log message. Should be created using |
- * {@link #makeTag(String)}. |
+ * @param tag Used to identify the source of a log message. |
* @param messageTemplate The message you would like logged. It is to be specified as a format |
* string. |
* @param args Arguments referenced by the format specifiers in the format string. If the last |