diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-06-29 11:22:48 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-07-03 13:37:54 +0200 |
| commit | da08e7752430feb58848172cd76176141e9af82f (patch) | |
| tree | 6ad4f9ea7a6ec5613d5d2b061b2f6acd78c85ebd /app/main.js | |
| parent | 01edba25d502ebaefedaa245ee4b48b888db811d (diff) | |
| download | mullvadvpn-da08e7752430feb58848172cd76176141e9af82f.tar.xz mullvadvpn-da08e7752430feb58848172cd76176141e9af82f.zip | |
Add productName to package.json and migrate to using app.getName()
Diffstat (limited to 'app/main.js')
| -rw-r--r-- | app/main.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/main.js b/app/main.js index 965d8b8eb3..1cbf72a1b9 100644 --- a/app/main.js +++ b/app/main.js @@ -14,10 +14,6 @@ import uuid from 'uuid'; import { ShutdownCoordinator } from './shutdown-handler'; import type { TrayIconType } from './tray-icon-controller'; -// The name for application directory used for -// scoping logs and user data in platform special folders -const appDirectoryName = 'Mullvad VPN'; - const ApplicationMain = { _windowController: (null: ?WindowController), _trayIconController: (null: ?TrayIconController), @@ -30,8 +26,6 @@ const ApplicationMain = { return; } - // Override userData path, i.e on macOS: ~/Library/Application Support/Mullvad VPN - app.setPath('userData', path.join(app.getPath('appData'), appDirectoryName)); this._initLogging(); log.info('Running version', version); @@ -78,6 +72,8 @@ const ApplicationMain = { log.transports.file.file = this._logFilePath; } + log.debug(`Logging to ${this._logFilePath}`); + // create log folder mkdirp.sync(logDirectory); }, @@ -90,7 +86,7 @@ const ApplicationMain = { switch (process.platform) { case 'darwin': // macOS: ~/Library/Logs/{appname} - return path.join(app.getPath('home'), 'Library/Logs', appDirectoryName); + return path.join(app.getPath('home'), 'Library/Logs', app.getName()); default: // Windows: %APPDATA%\{appname}\logs // Linux: ~/.config/{appname}/logs |
