Skip to content

Commit

Permalink
Close Graylog2 connection on close. Fixes #24
Browse files Browse the repository at this point in the history
Fix an issue where the Graylog2 transport ignores requests
from Winston to close the transport. This causes applications
depending on Winston's close() functionality to hang.

Caveat: currently there is no way to pass Graylog2's close()
callback to Winston, since Winston does not support this.
  • Loading branch information
YoniPrv committed Sep 19, 2017
1 parent c504722 commit f6c950e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/winston-graylog2.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,8 @@ Graylog2.prototype.log = function(level, msg, meta, callback) {
callback(null, true);
};

Graylog2.prototype.close = function() {
this.graylog2.close();
};

module.exports = Graylog2;

0 comments on commit f6c950e

Please sign in to comment.