mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-08 03:02:26 +02:00
Move log file to already existing Sandbox directory
This commit is contained in:
parent
143fc644d3
commit
4661d6e2d1
1 changed files with 7 additions and 3 deletions
|
@ -1,7 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
global.log = require('electron-log');
|
||||
|
||||
const electron = require('electron');
|
||||
const app = electron.app; // Module to control application life.
|
||||
const BrowserWindow = electron.BrowserWindow;
|
||||
|
@ -76,9 +74,15 @@ function getBuildInfo() {
|
|||
|
||||
return buildInfo;
|
||||
}
|
||||
|
||||
const buildInfo = getBuildInfo();
|
||||
|
||||
const logFile = getApplicationDataDirectory() + '/log.txt';
|
||||
fs.ensureFileSync(logFile); // Ensure file exists
|
||||
|
||||
global.log = require('electron-log');
|
||||
log.transports.file.maxSize = 5 * 1024 * 1024;
|
||||
log.transports.file.file = logFile;
|
||||
|
||||
log.debug("build info", buildInfo);
|
||||
|
||||
function getRootHifiDataDirectory() {
|
||||
|
|
Loading…
Reference in a new issue