You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
/// They are the most important ones, and they are not too verbose (for
7
+
/// example, they don't typically contain stack traces).
8
+
///
9
+
/// 2. `ActivityManager` starts with the application name and process ID:
10
+
///
11
+
/// ```txt
12
+
/// [stdout] 02-15 10:20:36.914 1735 1752 I ActivityManager: Start proc 6840:dev.flutter.scenarios/u0a98 for added application dev.flutter.scenarios
13
+
/// ```
14
+
///
15
+
/// The "application" comes from the file `android/app/build.gradle` under
16
+
/// `android > defaultConfig > applicationId`.
17
+
///
18
+
/// 3. Once we have the process ID, we can filter the logcat output further:
19
+
///
20
+
/// ```txt
21
+
/// [stdout] 02-15 10:20:37.430 6840 6840 E GeneratedPluginsRegister: Tried to automatically register plugins with FlutterEngine (io.flutter.embedding.engine.FlutterEngine@144d737) but could not find or invoke the GeneratedPluginRegistrant.
22
+
/// ```
23
+
///
24
+
/// A sample output of `adb logcat` command lives in `./sample_adb_logcat.txt`.
25
+
///
26
+
/// See also: <https://developer.android.com/tools/logcat>.
27
+
library;
28
+
29
+
/// Represents a line of `adb logcat` output parsed into a structured form.
30
+
///
31
+
/// For example the line:
32
+
/// ```txt
33
+
/// 02-22 13:54:39.839 549 3683 I ActivityManager: Force stopping dev.flutter.scenarios appid=10226 user=0: start instr
34
+
/// ```
35
+
///
36
+
/// ## Implementation notes
37
+
///
38
+
/// The reason this is an extension type and not a class is partially to use the
39
+
/// language feature, and partially because extension types work really well
40
+
/// with lazy parsing.
41
+
extension typeconstAdbLogLine._(Match _match) {
42
+
// RegEx that parses into the following groups:
43
+
// 1. Everything up to the severity (I, W, E, etc.).
44
+
// In other words, any whitespace, numbers, hyphens, colons, and periods.
45
+
// 2. The severity (a single uppercase letter).
46
+
// 3. The name of the process (up to the colon).
47
+
// 4. The message (after the colon).
48
+
//
49
+
// This regex is simple versus being more precise. Feel free to improve it.
0 commit comments