From 6fa5a9dbddb0e4e892e420896f224a1b1df6c4a3 Mon Sep 17 00:00:00 2001 From: codezjx Date: Fri, 20 Mar 2020 13:13:29 +0800 Subject: [PATCH 1/2] Add Android Studio's logcat compatibility for threadtime format --- logcat-threadtime.YAML-tmLanguage | 24 ++++++++++++------------ logcat-threadtime.tmLanguage | 10 +++++----- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/logcat-threadtime.YAML-tmLanguage b/logcat-threadtime.YAML-tmLanguage index b900924..229508f 100644 --- a/logcat-threadtime.YAML-tmLanguage +++ b/logcat-threadtime.YAML-tmLanguage @@ -12,8 +12,8 @@ firstLineMatch: -* beginning of /dev/log/.* # match: '(?x)^ # (?:\s*(\d+:)\s*)? # (optional) line number # ([\d-]+)\s+([\d:.]+)\s+ # date, time -# (\d+)\s+(\d+)\s+ # pid, tid -# ([VDIWEF])\s+(.*?):\s+ # log type, log tag +# (\d+)[-\s]+(\d+)\S*\s+ # pid, tid, package(optional) +# ([VDIWEF])[/\s]+(.*?):\s+ # log type, log tag # (.*) # log message # $' # captures: @@ -41,8 +41,8 @@ repository: match: '(?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ - (\d+)\s+(\d+)\s+ - ([V])\s+(.*?):\s+ + (\d+)[-\s]+(\d+)\S*\s+ + ([V])[/\s]+(.*?):\s+ (.*) $' captures: @@ -61,8 +61,8 @@ repository: match: '(?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ - (\d+)\s+(\d+)\s+ - ([D])\s+(.*?):\s+ + (\d+)[-\s]+(\d+)\S*\s+ + ([D])[/\s]+(.*?):\s+ (.*) $' captures: @@ -81,8 +81,8 @@ repository: match: '(?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ - (\d+)\s+(\d+)\s+ - ([I])\s+(.*?):\s+ + (\d+)[-\s]+(\d+)\S*\s+ + ([I])[/\s]+(.*?):\s+ (.*) $' captures: @@ -101,8 +101,8 @@ repository: match: '(?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ - (\d+)\s+(\d+)\s+ - ([W])\s+(.*?):\s+ + (\d+)[-\s]+(\d+)\S*\s+ + ([W])[/\s]+(.*?):\s+ (.*) $' captures: @@ -121,8 +121,8 @@ repository: match: '(?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ - (\d+)\s+(\d+)\s+ - ([EF])\s+(.*?):\s+ + (\d+)[-\s]+(\d+)\S*\s+ + ([EF])[/\s]+(.*?):\s+ (.*) $' captures: diff --git a/logcat-threadtime.tmLanguage b/logcat-threadtime.tmLanguage index 5fd8356..139e34f 100644 --- a/logcat-threadtime.tmLanguage +++ b/logcat-threadtime.tmLanguage @@ -82,7 +82,7 @@ match - (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)\s+(\d+)\s+ ([D])\s+(.*?):\s+ (.*) $ + (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)\S*\s+ ([D])[/\s]+(.*?):\s+ (.*) $ name meta.logcat.line.debug @@ -137,7 +137,7 @@ match - (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)\s+(\d+)\s+ ([EF])\s+(.*?):\s+ (.*) $ + (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)\S*\s+ ([EF])[/\s]+(.*?):\s+ (.*) $ name meta.logcat.line.error @@ -192,7 +192,7 @@ match - (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)\s+(\d+)\s+ ([I])\s+(.*?):\s+ (.*) $ + (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)\S*\s+ ([I])[/\s]+(.*?):\s+ (.*) $ name meta.logcat.line.info @@ -247,7 +247,7 @@ match - (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)\s+(\d+)\s+ ([V])\s+(.*?):\s+ (.*) $ + (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)\S*\s+ ([V])[/\s]+(.*?):\s+ (.*) $ name meta.logcat.line.verbose @@ -302,7 +302,7 @@ match - (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)\s+(\d+)\s+ ([W])\s+(.*?):\s+ (.*) $ + (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)\S*\s+ ([W])[/\s]+(.*?):\s+ (.*) $ name meta.logcat.line.warn From 089914cd620c58c16ec0ae3e3ce6cdb584268eb4 Mon Sep 17 00:00:00 2001 From: codezjx Date: Fri, 27 May 2022 10:24:36 +0800 Subject: [PATCH 2/2] Add bugreport logcat compatibility for threadtime format --- logcat-threadtime.tmLanguage | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/logcat-threadtime.tmLanguage b/logcat-threadtime.tmLanguage index 139e34f..eac1d9d 100644 --- a/logcat-threadtime.tmLanguage +++ b/logcat-threadtime.tmLanguage @@ -82,7 +82,7 @@ match - (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)\S*\s+ ([D])[/\s]+(.*?):\s+ (.*) $ + (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)[\S\s]*\s+ ([D])[/\s]+(.*?):\s+ (.*) $ name meta.logcat.line.debug @@ -137,7 +137,7 @@ match - (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)\S*\s+ ([EF])[/\s]+(.*?):\s+ (.*) $ + (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)[\S\s]*\s+ ([EF])[/\s]+(.*?):\s+ (.*) $ name meta.logcat.line.error @@ -192,7 +192,7 @@ match - (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)\S*\s+ ([I])[/\s]+(.*?):\s+ (.*) $ + (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)[\S\s]*\s+ ([I])[/\s]+(.*?):\s+ (.*) $ name meta.logcat.line.info @@ -247,7 +247,7 @@ match - (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)\S*\s+ ([V])[/\s]+(.*?):\s+ (.*) $ + (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)[\S\s]*\s+ ([V])[/\s]+(.*?):\s+ (.*) $ name meta.logcat.line.verbose @@ -302,7 +302,7 @@ match - (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)\S*\s+ ([W])[/\s]+(.*?):\s+ (.*) $ + (?x)^ (?:\s*(\d+:)\s*)? ([\d-]+)\s+([\d:.]+)\s+ (\d+)[-\s]+(\d+)[\S\s]*\s+ ([W])[/\s]+(.*?):\s+ (.*) $ name meta.logcat.line.warn