Skip to content

Commit d81e915

Browse files
Provide an ApplicationPackage to the flutter_tools logs command (#123149)
Provide an ApplicationPackage to the flutter_tools logs command
1 parent 92857dd commit d81e915

File tree

1 file changed

+6
-1
lines changed
  • packages/flutter_tools/lib/src/commands

1 file changed

+6
-1
lines changed

packages/flutter_tools/lib/src/commands/logs.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import 'dart:async';
66

7+
import '../application_package.dart';
78
import '../base/common.dart';
89
import '../base/io.dart';
910
import '../device.dart';
@@ -50,7 +51,11 @@ class LogsCommand extends FlutterCommand {
5051
cachedDevice.clearLogs();
5152
}
5253

53-
final DeviceLogReader logReader = await cachedDevice.getLogReader();
54+
final ApplicationPackage? app = await applicationPackages?.getPackageForPlatform(
55+
await cachedDevice.targetPlatform,
56+
);
57+
58+
final DeviceLogReader logReader = await cachedDevice.getLogReader(app: app);
5459

5560
globals.printStatus('Showing $logReader logs:');
5661

0 commit comments

Comments
 (0)