summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2022-10-06 15:02:00 +0200
committerOskar Nyberg <oskar@mullvad.net>2022-10-06 15:05:17 +0200
commit19e36fb3168ed41c5f52806a55ff0e13cc223cbe (patch)
treeebfac23a5ea8f5e4ce47aeb1bbea232a1ace018b
parentc5f19c9bad161bebc4a8304ab2c984d4ee60e98e (diff)
downloadmullvadvpn-19e36fb3168ed41c5f52806a55ff0e13cc223cbe.tar.xz
mullvadvpn-19e36fb3168ed41c5f52806a55ff0e13cc223cbe.zip
Add command line option for forwarding renderer log to main console logger
-rw-r--r--gui/src/main/command-line-options.ts1
-rw-r--r--gui/src/main/index.ts6
2 files changed, 6 insertions, 1 deletions
diff --git a/gui/src/main/command-line-options.ts b/gui/src/main/command-line-options.ts
index 258d3fc45c..26cb89887a 100644
--- a/gui/src/main/command-line-options.ts
+++ b/gui/src/main/command-line-options.ts
@@ -2,4 +2,5 @@ export enum CommandLineOptions {
showChanges = '--show-changes',
disableResetNavigation = '--disable-reset-navigation', // development only
disableDevtoolsOpen = '--disable-devtools-open', // development only
+ forwardRendererLog = '--forward-renderer-log', // development only
}
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index 6ede38b87f..e99dcd8e67 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -247,7 +247,11 @@ class ApplicationMain
const mainLogPath = getMainLogPath();
const rendererLogPath = getRendererLogPath();
- if (process.env.NODE_ENV !== 'development') {
+ if (process.env.NODE_ENV === 'development') {
+ if (process.argv.includes(CommandLineOptions.forwardRendererLog)) {
+ log.addInput(new IpcInput());
+ }
+ } else {
this.rendererLog = new Logger();
this.rendererLog.addInput(new IpcInput());