diff --git a/index.js b/index.js index 096a6a0ef5824854f0c2c498140e955b5e8f79c5..57c15b2e0566b6f01ad016fec1acaf2f8bbd0d5c 100644 --- a/index.js +++ b/index.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) {