All: Allow apps to work with read-only profile

pull/1987/head
Laurent Cozic 2019-10-14 10:35:04 +02:00
parent 008e30bdb7
commit 0370c7b627
1 changed files with 5 additions and 1 deletions

View File

@ -124,7 +124,11 @@ class Logger {
consoleObj[fn](line + this.objectsToString(...object));
} else if (target.type == 'file') {
let serializedObject = this.objectsToString(...object);
Logger.fsDriver().appendFileSync(target.path, `${line + serializedObject}\n`);
try {
Logger.fsDriver().appendFileSync(target.path, `${line + serializedObject}\n`);
} catch (error) {
console.error('Cannot write to log file:', error);
}
} else if (target.type == 'database') {
let msg = this.objectsToString(...object);