Skip to content

Commit

Permalink
Merge pull request #136 from sphansekar-cci/reconnect-and-flush-on-re…
Browse files Browse the repository at this point in the history
…connect

#135 Error handling and flushing message on reconnection.
  • Loading branch information
okkez authored Feb 15, 2019
2 parents 7f75c65 + 4aa6354 commit 1623b0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ class FluentSender {
let timeoutId = setTimeout(() => {
this.internalLogger.info('Fluentd is reconnecting...');
this._connect(() => {
this._flushSendQueue()
this.internalLogger.info('Fluentd reconnection finished!!');
});
}, this.reconnectInterval);
Expand Down
1 change: 1 addition & 0 deletions lib/winston.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = class FluentTransport extends Transport {
super(options);
this.name = 'fluent';
this.sender = new FluentSender(tag, options);
this.sender._setupErrorHandler();
}

log(info, callback) {
Expand Down

0 comments on commit 1623b0a

Please sign in to comment.