mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:01:18 +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';
|
'use strict';
|
||||||
|
|
||||||
global.log = require('electron-log');
|
|
||||||
|
|
||||||
const electron = require('electron');
|
const electron = require('electron');
|
||||||
const app = electron.app; // Module to control application life.
|
const app = electron.app; // Module to control application life.
|
||||||
const BrowserWindow = electron.BrowserWindow;
|
const BrowserWindow = electron.BrowserWindow;
|
||||||
|
@ -76,9 +74,15 @@ function getBuildInfo() {
|
||||||
|
|
||||||
return buildInfo;
|
return buildInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
const buildInfo = getBuildInfo();
|
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);
|
log.debug("build info", buildInfo);
|
||||||
|
|
||||||
function getRootHifiDataDirectory() {
|
function getRootHifiDataDirectory() {
|
||||||
|
|
Loading…
Reference in a new issue