Skip to content

Commit

Permalink
logger: don't change file path until after closed
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlucas committed Mar 30, 2016
1 parent 23cba21 commit 9ad201b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Logger.prototype.write = function write(data) {

const fp = this.getFilePath()
if (fp !== this.fp) {
this.fp = fp
this.close(() => {
this.fp = fp
this._createStream(() => {
this.stream.write(data + '\n')
})
Expand Down

0 comments on commit 9ad201b

Please sign in to comment.