Skip to content

Commit 247d61f

Browse files
committed
Remove log uploader
Fixes microsoft#75748
1 parent 8b93c01 commit 247d61f

7 files changed

Lines changed: 4 additions & 180 deletions

File tree

resources/completions/bash/code

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ _code()
5050
--uninstall-extension --enable-proposed-api --verbose --log -s
5151
--status -p --performance --prof-startup --disable-extensions
5252
--disable-extension --inspect-extensions
53-
--inspect-brk-extensions --disable-gpu --upload-logs
53+
--inspect-brk-extensions --disable-gpu
5454
--max-memory=' -- "$cur") )
5555
[[ $COMPREPLY == *= ]] && compopt -o nospace
5656
return

resources/completions/zsh/_code

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ arguments=(
3030
'--inspect-extensions[allow debugging and profiling of extensions]'
3131
'--inspect-brk-extensions[allow debugging and profiling of extensions with the extension host being paused after start]'
3232
'--disable-gpu[disable GPU hardware acceleration]'
33-
'--upload-logs[upload logs from current session to a secure endpoint]:confirm:(iConfirmLogsUpload)'
3433
'--max-memory=[max memory size for a window (in Mbytes)]:size (Mbytes)'
3534
'*:file or directory:_files'
3635
)

src/vs/code/electron-main/logUploader.ts

Lines changed: 0 additions & 153 deletions
This file was deleted.

src/vs/code/electron-main/main.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import { mnemonicButtonLabel } from 'vs/base/common/labels';
3535
import { SpdLogService } from 'vs/platform/log/node/spdlogService';
3636
import { IDiagnosticsService, DiagnosticsService } from 'vs/platform/diagnostics/electron-main/diagnosticsService';
3737
import { BufferLogService } from 'vs/platform/log/common/bufferLog';
38-
import { uploadLogs } from 'vs/code/electron-main/logUploader';
3938
import { setUnexpectedErrorHandler } from 'vs/base/common/errors';
4039
import { IThemeMainService, ThemeMainService } from 'vs/platform/theme/electron-main/themeMainService';
4140
import { Client } from 'vs/base/parts/ipc/common/ipc.net';
@@ -263,7 +262,7 @@ class CodeMain {
263262
// Skip this if we are running with --wait where it is expected that we wait for a while.
264263
// Also skip when gathering diagnostics (--status) which can take a longer time.
265264
let startupWarningDialogHandle: NodeJS.Timeout | undefined = undefined;
266-
if (!environmentService.wait && !environmentService.status && !environmentService.args['upload-logs']) {
265+
if (!environmentService.wait && !environmentService.status) {
267266
startupWarningDialogHandle = setTimeout(() => {
268267
this.showStartupWarningDialog(
269268
localize('secondInstanceNoResponse', "Another instance of {0} is running but not responding", product.nameShort),
@@ -285,16 +284,6 @@ class CodeMain {
285284
});
286285
}
287286

288-
// Log uploader
289-
if (typeof environmentService.args['upload-logs'] !== 'undefined') {
290-
return instantiationService.invokeFunction(async accessor => {
291-
await uploadLogs(launchClient, accessor.get(IRequestService), environmentService);
292-
293-
throw new ExpectedError();
294-
});
295-
}
296-
297-
298287
// Windows: allow to set foreground
299288
if (platform.isWindows) {
300289
await this.windowsAllowSetForegroundWindow(launchClient, logService);
@@ -322,13 +311,6 @@ class CodeMain {
322311
throw new ExpectedError('Terminating...');
323312
}
324313

325-
// Log uploader usage info
326-
if (typeof environmentService.args['upload-logs'] !== 'undefined') {
327-
logService.warn('Warning: The --upload-logs argument can only be used if Code is already running. Please run it again after Code has started.');
328-
329-
throw new ExpectedError('Terminating...');
330-
}
331-
332314
// dock might be hidden at this case due to a retry
333315
if (platform.isMacintosh) {
334316
app.dock.show();

src/vs/code/node/cli.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export async function main(argv: string[]): Promise<any> {
125125

126126
const processCallbacks: ((child: ChildProcess) => Promise<any>)[] = [];
127127

128-
const verbose = args.verbose || args.status || typeof args['upload-logs'] !== 'undefined';
128+
const verbose = args.verbose || args.status;
129129
if (verbose) {
130130
env['ELECTRON_ENABLE_LOGGING'] = '1';
131131

@@ -350,9 +350,7 @@ export async function main(argv: string[]): Promise<any> {
350350
env
351351
};
352352

353-
if (typeof args['upload-logs'] !== 'undefined') {
354-
options['stdio'] = ['pipe', 'pipe', 'pipe'];
355-
} else if (!verbose) {
353+
if (!verbose) {
356354
options['stdio'] = 'ignore';
357355
}
358356

src/vs/platform/environment/common/environment.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export interface ParsedArgs {
6464
'max-memory'?: string;
6565
'file-write'?: boolean;
6666
'file-chmod'?: boolean;
67-
'upload-logs'?: string;
6867
'driver'?: string;
6968
'driver-verbose'?: boolean;
7069
remote?: string;

src/vs/platform/environment/node/argv.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export const options: Option[] = [
6161
{ id: 'inspect-extensions', type: 'string', deprecates: 'debugPluginHost', args: 'port', cat: 't', description: localize('inspect-extensions', "Allow debugging and profiling of extensions. Check the developer tools for the connection URI.") },
6262
{ id: 'inspect-brk-extensions', type: 'string', deprecates: 'debugBrkPluginHost', args: 'port', cat: 't', description: localize('inspect-brk-extensions', "Allow debugging and profiling of extensions with the extension host being paused after start. Check the developer tools for the connection URI.") },
6363
{ id: 'disable-gpu', type: 'boolean', cat: 't', description: localize('disableGPU', "Disable GPU hardware acceleration.") },
64-
{ id: 'upload-logs', type: 'string', cat: 't', description: localize('uploadLogs', "Uploads logs from current session to a secure endpoint.") },
6564
{ id: 'max-memory', type: 'string', cat: 't', description: localize('maxMemory', "Max memory size for a window (in Mbytes).") },
6665

6766
{ id: 'remote', type: 'string' },

0 commit comments

Comments
 (0)