mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-08 18:11:10 +01:00
Fixed: Do not use colon character ":" in log tag since it is invalid and breaks logcat command filterspecs argument
This commit is contained in:
parent
0a3efc537d
commit
1b794b3518
1 changed files with 7 additions and 1 deletions
|
|
@ -450,11 +450,17 @@ public class Logger {
|
||||||
return CURRENT_LOG_LEVEL;
|
return CURRENT_LOG_LEVEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** The colon character ":" must not exist inside the tag, otherwise the `logcat` command
|
||||||
|
* filterspecs arguments `<tag>[:priority]` will not work and will throw `Invalid filter expression`
|
||||||
|
* error.
|
||||||
|
* https://cs.android.com/android/platform/superproject/+/android-12.0.0_r4:system/logging/liblog/logprint.cpp;l=363
|
||||||
|
* https://cs.android.com/android/platform/superproject/+/android-12.0.0_r4:system/logging/logcat/logcat.cpp;l=884
|
||||||
|
* */
|
||||||
public static String getFullTag(String tag) {
|
public static String getFullTag(String tag) {
|
||||||
if (DEFAULT_LOG_TAG.equals(tag))
|
if (DEFAULT_LOG_TAG.equals(tag))
|
||||||
return tag;
|
return tag;
|
||||||
else
|
else
|
||||||
return DEFAULT_LOG_TAG + ":" + tag;
|
return DEFAULT_LOG_TAG + "." + tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isLogLevelValid(Integer logLevel) {
|
public static boolean isLogLevelValid(Integer logLevel) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue