Force debug file to be written synchronously
This commit is contained in:
parent
d68a2b7bce
commit
2459f342c5
12
src/log.ts
12
src/log.ts
@ -41,15 +41,9 @@ export function dumpToDebug(what: string, data: any, create = false)
|
|||||||
{
|
{
|
||||||
if (create)
|
if (create)
|
||||||
{
|
{
|
||||||
fs.writeFile('debug.txt', '>>>>>>>> ' + what + ':\n' + data + '\n<<<<<<<<\n', (err) =>
|
fs.writeFileSync('debug.txt', '>>>>>>>> ' + what + ':\n' + data + '\n<<<<<<<<\n');
|
||||||
{
|
|
||||||
if (err) throw err;
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.appendFile('debug.txt', '>>>>>>>> ' + what + ':\n' + data + '\n<<<<<<<<\n', (err) =>
|
fs.appendFileSync('debug.txt', '>>>>>>>> ' + what + ':\n' + data + '\n<<<<<<<<\n');
|
||||||
{
|
}
|
||||||
if (err) throw err;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user