Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If writing to buffer, winston 'logging' event will never be emitted #67

Open
JustinLivi opened this issue Jan 9, 2017 · 0 comments · May be fixed by #69
Open

If writing to buffer, winston 'logging' event will never be emitted #67

JustinLivi opened this issue Jan 9, 2017 · 0 comments · May be fixed by #69

Comments

@JustinLivi
Copy link

On line 397 we attempt to write to the stream and invoke the winston-provided callback on response. However, if the stream is unavailable and we are writing to buffer on line 400 the callback is simply dropped and will never be invoked.

This results in the 'logging' event for the winston logger never firing for that transport and any buffered messages. To the end user it appears as though the messages themselves have been dropped, when in reality they have simply been buffered.

A potential relatively simple solution would be to simply retain references to the callbacks for buffered messages, and invoke these when the buffer has been successfully processed. If desired, I could make an attempt at implementing this change.

@timdp timdp linked a pull request Apr 25, 2017 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant