Skip to content

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

Open

Description

Activity

  1. tbenade commented on Feb 22, 2018

    @tbenade

    no movement on this?

  2. shakeelmohamed commented on Feb 23, 2018

    @shakeelmohamed
    ContributorAuthor

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

  3. spencermurray commented on Jan 10, 2020

    @spencermurray

    How near?

  4. shakeelmohamed commented on Jan 10, 2020

    @shakeelmohamed
    ContributorAuthor

    @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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions