Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion lib/sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,18 @@ function FluentSender(tag_prefix, options) {
};
this.sharedKeySalt = crypto.randomBytes(16).toString('hex');
// helo, pingpong, established
this._status = null;
Object.defineProperties(this, {
'_status': {
get: function() {
return this.__status;
},
set: function(newStatus) {
this.internalLogger.info({oldStatus: this.__status, newStatus: newStatus});
this.__status = newStatus;
}
}
});
this.__status = null;
this._connecting = false;
}

Expand Down Expand Up @@ -451,6 +462,7 @@ FluentSender.prototype._setupErrorHandler = function _setupErrorHandler(callback
this.internalLogger.info('Fluentd is reconnecting...');
this._connect(() => {
this.internalLogger.info('Fluentd reconnection finished!!');
this._handleEvent('reconnect');
});
}, this.reconnectInterval);
callback && callback(timeoutId);
Expand Down