fluent/fluent-logger-node

`_status` not reset after FluentLoggerError.MissingTag

haosu opened this issue · 1 comments

haosu commented

On FluentLoggerError.MissingTag errors the reconnect handler (https://github.com/fluent/fluent-logger-node/blob/master/lib/sender.js#L453) does not set _status back to established, and does not re-emit the connect event.

Background: I've implemented a bounded event queue that queues if the fluent-logger is not connected, and attempts to flush when the logger reconnects. In cases of event data errors callers cannot be accurately notified of when the logger reconnects either through looking at _status or depending on the connect event.

okkez commented

We cannot refer _status from user code. Because _status is a private member.
So I've added a new event reconnect to handle reconnection.
Could you try #95? Is it ok? Feel free to comment, please.