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

This commit is contained in:
Jonah Williams 2019-03-13 22:42:12 -07:00 committed by GitHub
parent 7ac2486a4c
commit 25820ab2a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 0 deletions

View File

@ -439,6 +439,9 @@ class AndroidDevice extends Device {
cmd.addAll(<String>['--ez', 'start-paused', 'true']);
if (debuggingOptions.useTestFonts)
cmd.addAll(<String>['--ez', 'use-test-fonts', 'true']);
if (debuggingOptions.verboseSystemLogs) {
cmd.addAll(<String>['--ez', '--verbose-logging', 'true']);
}
}
cmd.add(apk.launchActivity);
final String result = (await runCheckedAsync(cmd)).stdout;

View File

@ -32,6 +32,10 @@ abstract class RunCommandBase extends FlutterCommand {
negatable: false,
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',
help: 'Which route to load when running the app.',
)
@ -256,6 +260,7 @@ class RunCommand extends RunCommandBase {
traceSkia: argResults['trace-skia'],
traceSystrace: argResults['trace-systrace'],
observatoryPort: observatoryPort,
verboseSystemLogs: argResults['verbose-system-logs'],
);
}
}

View File

@ -372,6 +372,7 @@ class DebuggingOptions {
this.traceSkia = false,
this.traceSystrace = false,
this.useTestFonts = false,
this.verboseSystemLogs = false,
this.observatoryPort,
}) : debuggingEnabled = true;
@ -383,6 +384,7 @@ class DebuggingOptions {
skiaDeterministicRendering = false,
traceSkia = false,
traceSystrace = false,
verboseSystemLogs = false,
observatoryPort = null;
final bool debuggingEnabled;
@ -394,6 +396,7 @@ class DebuggingOptions {
final bool traceSkia;
final bool traceSystrace;
final bool useTestFonts;
final bool verboseSystemLogs;
final int observatoryPort;
bool get hasObservatoryPort => observatoryPort != null;

View File

@ -297,6 +297,10 @@ class IOSDevice extends Device {
if (debuggingOptions.traceSkia)
launchArguments.add('--trace-skia');
if (debuggingOptions.verboseSystemLogs) {
launchArguments.add('--verbose-logging');
}
if (platformArgs['trace-startup'] ?? false)
launchArguments.add('--trace-startup');