Add logs for main process
This commit is contained in:
parent
4567e07d70
commit
cf178a53f2
|
@ -129,14 +129,18 @@ function createWindow() {
|
||||||
autoUpdater.init(mainWindow);
|
autoUpdater.init(mainWindow);
|
||||||
});
|
});
|
||||||
|
|
||||||
mainWindow.webContents.on('crashed', () => {
|
mainWindow.webContents.on('crashed', (event) => {
|
||||||
log.info('App Crashed');
|
log.info(`App Crashed: ${event}`);
|
||||||
mainWindow.reload();
|
mainWindow.reload();
|
||||||
});
|
});
|
||||||
|
|
||||||
mainWindow.on("closed", () => (mainWindow = null));
|
mainWindow.on("closed", () => (mainWindow = null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
process.on('uncaughtException',function(error){
|
||||||
|
log.error(error);
|
||||||
|
});
|
||||||
|
|
||||||
app.userAgentFallback = process.platform ==='win32' ?
|
app.userAgentFallback = process.platform ==='win32' ?
|
||||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.100 Safari/537.36' :
|
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.100 Safari/537.36' :
|
||||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) old-airport-include/1.0.0 Chrome Electron/7.1.7 Safari/537.36';
|
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) old-airport-include/1.0.0 Chrome Electron/7.1.7 Safari/537.36';
|
||||||
|
|
Loading…
Reference in New Issue