diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-06-04 17:10:50 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2019-06-10 10:39:18 +0200 |
| commit | 09a1093b1ca7f4d10aa8ffd77ddfe0b1ca2b065c (patch) | |
| tree | f774aa261927373d5b351d93d10d691de7a54091 /gui/src/main | |
| parent | 5e58620a7fc4a47a1471ce1199bf374b52f63faa (diff) | |
| download | mullvadvpn-09a1093b1ca7f4d10aa8ffd77ddfe0b1ca2b065c.tar.xz mullvadvpn-09a1093b1ca7f4d10aa8ffd77ddfe0b1ca2b065c.zip | |
Patch frontend to not collect the paths for its own logs
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/index.ts | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index b4c97cbb2c..15a137dd10 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -70,9 +70,6 @@ class ApplicationMain { private daemonRpc = new DaemonRpc(); private reconnectBackoff = new ReconnectionBackoff(); private connectedToDaemon = false; - - private logFilePaths: string[] = []; - private oldLogFilePaths: string[] = []; private quitStage = AppQuitStage.unready; private accountHistory: AccountToken[] = []; @@ -188,17 +185,15 @@ class ApplicationMain { private initLogging() { const logDirectory = getLogsDirectory(); const mainLogFile = getMainLogFile(); - const rendererLogFile = getRendererLogFile(); - const logFiles = [mainLogFile, rendererLogFile]; + const logFiles = [mainLogFile, getRendererLogFile()]; if (process.env.NODE_ENV !== 'development') { // Ensure log directory exists mkdirp.sync(logDirectory); - this.logFilePaths = logFiles; - this.oldLogFilePaths = logFiles - .map((logFile) => backupLogFile(logFile)) - .filter((oldLogFile): oldLogFile is string => typeof oldLogFile === 'string'); + for (const logFile of logFiles) { + backupLogFile(logFile); + } } setupLogging(mainLogFile); @@ -886,10 +881,8 @@ class ApplicationMain { const executable = resolveBin('problem-report'); const args = ['collect', '--output', reportPath]; if (toRedact.length > 0) { - args.push('--redact', ...toRedact, '--'); + args.push('--redact', ...toRedact); } - args.push(...this.logFilePaths); - args.push(...this.oldLogFilePaths); execFile(executable, args, { windowsHide: true }, (error, stdout, stderr) => { if (error) { |
