(logger?: Logger, workspaceContext?: WorkspaceContext)
| 762 | } |
| 763 | |
| 764 | function buildLogHeaders(logger?: Logger, workspaceContext?: WorkspaceContext) { |
| 765 | clearLogHeader(); |
| 766 | addToLogHeader(() => `Dart Code extension: ${extensionVersion}`); |
| 767 | addToLogHeader(() => { |
| 768 | const ext = vs.extensions.getExtension(flutterExtensionIdentifier)!; |
| 769 | return `Flutter extension: ${ext.packageJSON.version} (${ext.isActive ? "" : "not "}activated)`; |
| 770 | }); |
| 771 | addToLogHeader(() => ``); |
| 772 | addToLogHeader(() => `App: ${vs.env.appName}`); |
| 773 | if (vs.env.appHost) |
| 774 | addToLogHeader(() => `App Host: ${vs.env.appHost}`); |
| 775 | if (vs.env.remoteName) |
| 776 | addToLogHeader(() => `Remote: ${vs.env.remoteName}`); |
| 777 | if (hostKind) |
| 778 | addToLogHeader(() => `Host Kind: ${hostKind}`); |
| 779 | addToLogHeader(() => `Version: ${platformDisplayName} ${vs.version}`); |
| 780 | if (workspaceContext) { |
| 781 | addToLogHeader(() => ``); |
| 782 | addToLogHeader(() => `Workspace type: ${workspaceContext.workspaceTypeDescription} (LSP)${vs.workspace.workspaceFolders && vs.workspace.workspaceFolders.length > 1 ? " (Multiroot)" : ""}`); |
| 783 | addToLogHeader(() => `Workspace name: ${vs.workspace.name}`); |
| 784 | const sdks = workspaceContext.sdks; |
| 785 | addToLogHeader(() => ``); |
| 786 | addToLogHeader(() => `Dart (${sdks.dartVersion}): ${sdks.dart}`); |
| 787 | const deviceInfo = deviceManager?.currentDevice ? `${deviceManager?.currentDevice?.name} (${deviceManager?.currentDevice?.platform}/${deviceManager?.currentDevice?.platformType})` : `No device`; |
| 788 | addToLogHeader(() => `Flutter (${sdks.flutterVersion}): ${sdks.flutter} (${deviceInfo})`); |
| 789 | } |
| 790 | addToLogHeader(() => ``); |
| 791 | if (process.env.HTTP_PROXY || process.env.NO_PROXY) |
| 792 | addToLogHeader(() => `HTTP_PROXY: ${process.env.HTTP_PROXY}, NO_PROXY: ${process.env.NO_PROXY}`); |
| 793 | |
| 794 | // Any time the log headers are rebuilt, we should re-log them. |
| 795 | logger?.info(getLogHeader()); |
| 796 | } |
| 797 | |
| 798 | |
| 799 | function handleConfigurationChange() { |
no test coverage detected