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

Logger is blocking node.js process from exiting when batchInterval is set #13

Open
shakeelmohamed opened this issue Nov 30, 2016 · 4 comments

Comments

@shakeelmohamed
Copy link
Contributor

See splunk/splunk-bunyan-logger#5

@tbenade
Copy link

tbenade commented Feb 22, 2018

no movement on this?

@shakeelmohamed
Copy link
Contributor Author

@tbenade we would love a PR. Otherwise we will make some progress in the near future

@spencermurray
Copy link

How near?

@shakeelmohamed
Copy link
Contributor Author

@spencermurray feel free to open a PR for this. I believe something like the following should address the issue, but we haven't had a chance to test this out.

Perhaps this would go in the SplunkLogger constructor:

var that = this;
process.on('exit', function() {
  that.flush();
  that._disableTimer();
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants