File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
termux-shared/src/main/java/com/termux/shared/logger Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -450,11 +450,17 @@ public static int setLogLevel(Context context, int logLevel) {
450450 return CURRENT_LOG_LEVEL ;
451451 }
452452
453+ /** The colon character ":" must not exist inside the tag, otherwise the `logcat` command
454+ * filterspecs arguments `<tag>[:priority]` will not work and will throw `Invalid filter expression`
455+ * error.
456+ * https://cs.android.com/android/platform/superproject/+/android-12.0.0_r4:system/logging/liblog/logprint.cpp;l=363
457+ * https://cs.android.com/android/platform/superproject/+/android-12.0.0_r4:system/logging/logcat/logcat.cpp;l=884
458+ * */
453459 public static String getFullTag (String tag ) {
454460 if (DEFAULT_LOG_TAG .equals (tag ))
455461 return tag ;
456462 else
457- return DEFAULT_LOG_TAG + ": " + tag ;
463+ return DEFAULT_LOG_TAG + ". " + tag ;
458464 }
459465
460466 public static boolean isLogLevelValid (Integer logLevel ) {
You can’t perform that action at this time.
0 commit comments