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

Call callbacks in batch logging scenario once the request is sent or failed. #33

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

bosjgt
Copy link

@bosjgt bosjgt commented Sep 25, 2019

Currently if the logger is configured for batch messaging, the callback for the send call is not being invoked except for messages that cause the batch limit to be reached.

For context: This is currently causing a problem trying to create a transport for winston to connect logs to splunk when configuring this library to use batch sending. Since the initial callback is never invoked, only one log message will ever get sent.

This code change retains a reference to the callbacks for every message that is queued up, so that once the request is complete or fails, every message's callback that was sent or failed to send is invoked.

@bparmar-splunk
Copy link

Hi @bosjgt,
This PR have code conflicts with current branch.
Could you please resolve the conflicts and push the changes again ?

Thank you.

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 this pull request may close these issues.

3 participants