mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
add option for --verbose-system-logs (#29321)
This commit is contained in:
parent
7ac2486a4c
commit
25820ab2a4
@ -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;
|
||||
|
||||
@ -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'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user