-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: File Transport not flush buffers to file #1868
base: master
Are you sure you want to change the base?
Conversation
43b65cd
to
b40232f
Compare
lib/winston/transports/file.js
Outdated
*/ | ||
_waitStreamsCreatedButNotPiped(cb) { | ||
if (this._destOpened) { | ||
return cb(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially violates the @returns {undefined} docs as cb could return anything?
lib/winston/transports/file.js
Outdated
} | ||
|
||
this.once('startPipe', () => { | ||
this._dest.once('finish', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arrow function not required?
this._dest.once('finish', cb);
lib/winston/transports/file.js
Outdated
cb(); | ||
}); | ||
|
||
this.close(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arrow function not required?
this.close(this._endStream);
b40232f
to
5449584
Compare
@rheh Fixed. Please review again. |
fix #228 #1504
Test Case: