Logfile in user dir
This commit is contained in:
parent
0f4b82807e
commit
60881eaf3e
@ -223,10 +223,8 @@
|
|||||||
return { ok: true, activeName: '0', scanStoreLogging: false }
|
return { ok: true, activeName: '0', scanStoreLogging: false }
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
console.debug('Mount')
|
|
||||||
this.$store.watch(
|
this.$store.watch(
|
||||||
function (state) {
|
function (state) {
|
||||||
console.debug('Mount ' + JSON.stringify(state))
|
|
||||||
return state.Settings.settings
|
return state.Settings.settings
|
||||||
},
|
},
|
||||||
() => { this.loggingChanged() }
|
() => { this.loggingChanged() }
|
||||||
|
@ -14,9 +14,12 @@ d.getMilliseconds() + '.log';
|
|||||||
var logStream = null;
|
var logStream = null;
|
||||||
|
|
||||||
var loggerInit = function (logging) {
|
var loggerInit = function (logging) {
|
||||||
|
debugger;
|
||||||
if (logging) {
|
if (logging) {
|
||||||
try {
|
try {
|
||||||
logStream = require('fs').createWriteStream( fName, {autoClose: true});
|
const homedir = require('os').homedir();
|
||||||
|
const logFileName = require('path').join(homedir, fName);
|
||||||
|
logStream = require('fs').createWriteStream( logFileName, {autoClose: true});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Logging not possible ' + error);
|
console.error('Logging not possible ' + error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user