diff --git a/src/main/preload/mattermost.js b/src/main/preload/mattermost.js index 4898598b..d86302c3 100644 --- a/src/main/preload/mattermost.js +++ b/src/main/preload/mattermost.js @@ -7,21 +7,21 @@ /* eslint-disable no-magic-numbers */ import {ipcRenderer, webFrame} from 'electron'; -// I've filed an issue in electron-log https://github.com/megahertz/electron-log/issues/267 -// we'll be able to use it again if there is a workaround for the 'os' import -//import log from 'electron-log'; +import log from 'electron-log'; import {NOTIFY_MENTION, IS_UNREAD, UNREAD_RESULT, SESSION_EXPIRED, SET_VIEW_NAME, REACT_APP_INITIALIZED, USER_ACTIVITY_UPDATE, CLOSE_TEAMS_DROPDOWN} from 'common/communication'; const UNREAD_COUNT_INTERVAL = 1000; const CLEAR_CACHE_INTERVAL = 6 * 60 * 60 * 1000; // 6 hours +Reflect.deleteProperty(global.Buffer); // http://electron.atom.io/docs/tutorial/security/#buffer-global + let appVersion; let appName; let sessionExpired; let viewName; -console.log('Preload initialized'); +log.info('Initializing preload'); ipcRenderer.invoke('get-app-version').then(({name, version}) => { appVersion = version;