Provide an ApplicationPackage to the flutter_tools logs command (#123149)

Provide an ApplicationPackage to the flutter_tools logs command
This commit is contained in:
Jason Simmons
2023-03-22 07:51:39 -07:00
committed by GitHub
parent 92857dd0e6
commit d81e915780

View File

@@ -4,6 +4,7 @@
import 'dart:async';
import '../application_package.dart';
import '../base/common.dart';
import '../base/io.dart';
import '../device.dart';
@@ -50,7 +51,11 @@ class LogsCommand extends FlutterCommand {
cachedDevice.clearLogs();
}
final DeviceLogReader logReader = await cachedDevice.getLogReader();
final ApplicationPackage? app = await applicationPackages?.getPackageForPlatform(
await cachedDevice.targetPlatform,
);
final DeviceLogReader logReader = await cachedDevice.getLogReader(app: app);
globals.printStatus('Showing $logReader logs:');