Unverified Commit 25820ab2 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

add option for --verbose-system-logs (#29321)

parent 7ac2486a
...@@ -439,6 +439,9 @@ class AndroidDevice extends Device { ...@@ -439,6 +439,9 @@ class AndroidDevice extends Device {
cmd.addAll(<String>['--ez', 'start-paused', 'true']); cmd.addAll(<String>['--ez', 'start-paused', 'true']);
if (debuggingOptions.useTestFonts) if (debuggingOptions.useTestFonts)
cmd.addAll(<String>['--ez', 'use-test-fonts', 'true']); cmd.addAll(<String>['--ez', 'use-test-fonts', 'true']);
if (debuggingOptions.verboseSystemLogs) {
cmd.addAll(<String>['--ez', '--verbose-logging', 'true']);
}
} }
cmd.add(apk.launchActivity); cmd.add(apk.launchActivity);
final String result = (await runCheckedAsync(cmd)).stdout; final String result = (await runCheckedAsync(cmd)).stdout;
......
...@@ -32,6 +32,10 @@ abstract class RunCommandBase extends FlutterCommand { ...@@ -32,6 +32,10 @@ abstract class RunCommandBase extends FlutterCommand {
negatable: false, negatable: false,
help: 'Trace application startup, then exit, saving the trace to a file.', help: 'Trace application startup, then exit, saving the trace to a file.',
) )
..addFlag('verbose-system-logs',
negatable: false,
help: 'Include verbose logging from the flutter engine.'
)
..addOption('route', ..addOption('route',
help: 'Which route to load when running the app.', help: 'Which route to load when running the app.',
) )
...@@ -256,6 +260,7 @@ class RunCommand extends RunCommandBase { ...@@ -256,6 +260,7 @@ class RunCommand extends RunCommandBase {
traceSkia: argResults['trace-skia'], traceSkia: argResults['trace-skia'],
traceSystrace: argResults['trace-systrace'], traceSystrace: argResults['trace-systrace'],
observatoryPort: observatoryPort, observatoryPort: observatoryPort,
verboseSystemLogs: argResults['verbose-system-logs'],
); );
} }
} }
......
...@@ -372,6 +372,7 @@ class DebuggingOptions { ...@@ -372,6 +372,7 @@ class DebuggingOptions {
this.traceSkia = false, this.traceSkia = false,
this.traceSystrace = false, this.traceSystrace = false,
this.useTestFonts = false, this.useTestFonts = false,
this.verboseSystemLogs = false,
this.observatoryPort, this.observatoryPort,
}) : debuggingEnabled = true; }) : debuggingEnabled = true;
...@@ -383,6 +384,7 @@ class DebuggingOptions { ...@@ -383,6 +384,7 @@ class DebuggingOptions {
skiaDeterministicRendering = false, skiaDeterministicRendering = false,
traceSkia = false, traceSkia = false,
traceSystrace = false, traceSystrace = false,
verboseSystemLogs = false,
observatoryPort = null; observatoryPort = null;
final bool debuggingEnabled; final bool debuggingEnabled;
...@@ -394,6 +396,7 @@ class DebuggingOptions { ...@@ -394,6 +396,7 @@ class DebuggingOptions {
final bool traceSkia; final bool traceSkia;
final bool traceSystrace; final bool traceSystrace;
final bool useTestFonts; final bool useTestFonts;
final bool verboseSystemLogs;
final int observatoryPort; final int observatoryPort;
bool get hasObservatoryPort => observatoryPort != null; bool get hasObservatoryPort => observatoryPort != null;
......
...@@ -297,6 +297,10 @@ class IOSDevice extends Device { ...@@ -297,6 +297,10 @@ class IOSDevice extends Device {
if (debuggingOptions.traceSkia) if (debuggingOptions.traceSkia)
launchArguments.add('--trace-skia'); launchArguments.add('--trace-skia');
if (debuggingOptions.verboseSystemLogs) {
launchArguments.add('--verbose-logging');
}
if (platformArgs['trace-startup'] ?? false) if (platformArgs['trace-startup'] ?? false)
launchArguments.add('--trace-startup'); launchArguments.add('--trace-startup');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment