summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2019-06-10 11:15:16 +0200
committerLinus Färnstrand <linus@mullvad.net>2019-06-10 11:15:16 +0200
commit7aee7111bd914eb64bb7cff86758dcf7b41dc08f (patch)
treef774aa261927373d5b351d93d10d691de7a54091 /gui/src
parentd20fed36f95e2d535b2272777a78dc84ed9e1e6b (diff)
parent09a1093b1ca7f4d10aa8ffd77ddfe0b1ca2b065c (diff)
downloadmullvadvpn-7aee7111bd914eb64bb7cff86758dcf7b41dc08f.tar.xz
mullvadvpn-7aee7111bd914eb64bb7cff86758dcf7b41dc08f.zip
Merge branch 'problem-report-automatically-include-frontend-logs'
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/index.ts17
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) {