diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-10-06 15:02:00 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-10-06 15:05:17 +0200 |
| commit | 19e36fb3168ed41c5f52806a55ff0e13cc223cbe (patch) | |
| tree | ebfac23a5ea8f5e4ce47aeb1bbea232a1ace018b /gui/src/main | |
| parent | c5f19c9bad161bebc4a8304ab2c984d4ee60e98e (diff) | |
| download | mullvadvpn-19e36fb3168ed41c5f52806a55ff0e13cc223cbe.tar.xz mullvadvpn-19e36fb3168ed41c5f52806a55ff0e13cc223cbe.zip | |
Add command line option for forwarding renderer log to main console logger
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/command-line-options.ts | 1 | ||||
| -rw-r--r-- | gui/src/main/index.ts | 6 |
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()); |
