Improved log.txt logging, #3589

This commit is contained in:
Ylian Saint-Hilaire 2022-02-03 11:57:32 -08:00
parent 193bb106f3
commit 59e7631694

View File

@ -3128,7 +3128,7 @@ function CreateMeshCentralServer(config, args) {
if (obj.xxLogFile != null) {
try {
if (obj.xxLogDateStr != d.toLocaleDateString()) { obj.xxLogDateStr = d.toLocaleDateString(); obj.fs.writeSync(obj.xxLogFile, '---- ' + d.toLocaleDateString() + ' ----\r\n'); }
obj.fs.writeSync(obj.xxLogFile, new Date().toLocaleTimeString() + ' - ' + source + ': ' + Array.prototype.slice.call(...args).join('') + '\r\n');
obj.fs.writeSync(obj.xxLogFile, new Date().toLocaleTimeString() + ' - ' + source + ': ' + args.join(', ') + '\r\n');
} catch (ex) { }
}
}