Skip to content

Commit

Permalink
Remove log uploader
Browse files Browse the repository at this point in the history
Fixes #75748
  • Loading branch information
mjbvz committed Jun 20, 2019
1 parent 8b93c01 commit 247d61f
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 180 deletions.
2 changes: 1 addition & 1 deletion resources/completions/bash/code
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ _code()
--uninstall-extension --enable-proposed-api --verbose --log -s
--status -p --performance --prof-startup --disable-extensions
--disable-extension --inspect-extensions
--inspect-brk-extensions --disable-gpu --upload-logs
--inspect-brk-extensions --disable-gpu
--max-memory=' -- "$cur") )
[[ $COMPREPLY == *= ]] && compopt -o nospace
return
Expand Down
1 change: 0 additions & 1 deletion resources/completions/zsh/_code
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ arguments=(
'--inspect-extensions[allow debugging and profiling of extensions]'
'--inspect-brk-extensions[allow debugging and profiling of extensions with the extension host being paused after start]'
'--disable-gpu[disable GPU hardware acceleration]'
'--upload-logs[upload logs from current session to a secure endpoint]:confirm:(iConfirmLogsUpload)'
'--max-memory=[max memory size for a window (in Mbytes)]:size (Mbytes)'
'*:file or directory:_files'
)
Expand Down
153 changes: 0 additions & 153 deletions src/vs/code/electron-main/logUploader.ts

This file was deleted.

20 changes: 1 addition & 19 deletions src/vs/code/electron-main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import { mnemonicButtonLabel } from 'vs/base/common/labels';
import { SpdLogService } from 'vs/platform/log/node/spdlogService';
import { IDiagnosticsService, DiagnosticsService } from 'vs/platform/diagnostics/electron-main/diagnosticsService';
import { BufferLogService } from 'vs/platform/log/common/bufferLog';
import { uploadLogs } from 'vs/code/electron-main/logUploader';
import { setUnexpectedErrorHandler } from 'vs/base/common/errors';
import { IThemeMainService, ThemeMainService } from 'vs/platform/theme/electron-main/themeMainService';
import { Client } from 'vs/base/parts/ipc/common/ipc.net';
Expand Down Expand Up @@ -263,7 +262,7 @@ class CodeMain {
// Skip this if we are running with --wait where it is expected that we wait for a while.
// Also skip when gathering diagnostics (--status) which can take a longer time.
let startupWarningDialogHandle: NodeJS.Timeout | undefined = undefined;
if (!environmentService.wait && !environmentService.status && !environmentService.args['upload-logs']) {
if (!environmentService.wait && !environmentService.status) {
startupWarningDialogHandle = setTimeout(() => {
this.showStartupWarningDialog(
localize('secondInstanceNoResponse', "Another instance of {0} is running but not responding", product.nameShort),
Expand All @@ -285,16 +284,6 @@ class CodeMain {
});
}

// Log uploader
if (typeof environmentService.args['upload-logs'] !== 'undefined') {
return instantiationService.invokeFunction(async accessor => {
await uploadLogs(launchClient, accessor.get(IRequestService), environmentService);

throw new ExpectedError();
});
}


// Windows: allow to set foreground
if (platform.isWindows) {
await this.windowsAllowSetForegroundWindow(launchClient, logService);
Expand Down Expand Up @@ -322,13 +311,6 @@ class CodeMain {
throw new ExpectedError('Terminating...');
}

// Log uploader usage info
if (typeof environmentService.args['upload-logs'] !== 'undefined') {
logService.warn('Warning: The --upload-logs argument can only be used if Code is already running. Please run it again after Code has started.');

throw new ExpectedError('Terminating...');
}

// dock might be hidden at this case due to a retry
if (platform.isMacintosh) {
app.dock.show();
Expand Down
6 changes: 2 additions & 4 deletions src/vs/code/node/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export async function main(argv: string[]): Promise<any> {

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

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

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

if (typeof args['upload-logs'] !== 'undefined') {
options['stdio'] = ['pipe', 'pipe', 'pipe'];
} else if (!verbose) {
if (!verbose) {
options['stdio'] = 'ignore';
}

Expand Down
1 change: 0 additions & 1 deletion src/vs/platform/environment/common/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export interface ParsedArgs {
'max-memory'?: string;
'file-write'?: boolean;
'file-chmod'?: boolean;
'upload-logs'?: string;
'driver'?: string;
'driver-verbose'?: boolean;
remote?: string;
Expand Down
1 change: 0 additions & 1 deletion src/vs/platform/environment/node/argv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export const options: Option[] = [
{ 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.") },
{ 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.") },
{ id: 'disable-gpu', type: 'boolean', cat: 't', description: localize('disableGPU', "Disable GPU hardware acceleration.") },
{ id: 'upload-logs', type: 'string', cat: 't', description: localize('uploadLogs', "Uploads logs from current session to a secure endpoint.") },
{ id: 'max-memory', type: 'string', cat: 't', description: localize('maxMemory', "Max memory size for a window (in Mbytes).") },

{ id: 'remote', type: 'string' },
Expand Down

0 comments on commit 247d61f

Please sign in to comment.