Skip to content
Snippets Groups Projects
Commit 7f3f7643 authored by admin-sigmundd's avatar admin-sigmundd
Browse files

FileWrite is now non-blocking

parent f780b828
No related branches found
No related tags found
1 merge request!1Update index.test.js, examples/all-options.js, examples/log-to-file.js,...
......@@ -59,7 +59,11 @@ function Log (options) {
console.log(msg)
}
if (this.options.file) {
this.fs.appendFileSync(this.options.file, msg + '\n')
this.fs.appendFile(this.options.file, msg + '\n', function (error) {
if (error) {
console.error('Cannot write to File ' + this.options.file)
}
})
}
if (this.options.graylog) {
switch (tag) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment