Logfile in user dir

This commit is contained in:
Keith Paterson 2021-06-03 16:00:46 +02:00
parent 0f4b82807e
commit 60881eaf3e
2 changed files with 4 additions and 3 deletions

View File

@ -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() }

View File

@ -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);
} }