fluent / fluent-logger-node

A structured logger for Fluentd (Node.js)
Apache License 2.0
259 stars 83 forks source link

Gracefully free resources on `.end()` #144

Closed indexzero closed 5 years ago

indexzero commented 5 years ago

The winston Logger attempts to call .end() on every transport it is currently piped to before emitting the finish event (see: logger.js)

By implementing _final(callback) from the WritableStream API we ensure that any resources from the FluentSender are cleaned up (e.g. sockets that need to be destroyed).

p.s. thanks for helping grow & support the winston ecosystem 👍🥇💯

okkez commented 5 years ago

Thanks! Great!

indexzero commented 5 years ago

Thanks for merging! When you have a moment publishing a new version with this would be appreciated.