Skip to content

Commit 1623b0a

Browse files
authored
Merge pull request #136 from sphansekar-cci/reconnect-and-flush-on-reconnect
#135 Error handling and flushing message on reconnection.
2 parents 7f75c65 + 4aa6354 commit 1623b0a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/sender.js

+1
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ class FluentSender {
451451
let timeoutId = setTimeout(() => {
452452
this.internalLogger.info('Fluentd is reconnecting...');
453453
this._connect(() => {
454+
this._flushSendQueue()
454455
this.internalLogger.info('Fluentd reconnection finished!!');
455456
});
456457
}, this.reconnectInterval);

lib/winston.js

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = class FluentTransport extends Transport {
3232
super(options);
3333
this.name = 'fluent';
3434
this.sender = new FluentSender(tag, options);
35+
this.sender._setupErrorHandler();
3536
}
3637

3738
log(info, callback) {

0 commit comments

Comments
 (0)