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

Cannot flush logs before process ends #52

Closed
JADurham909 opened this issue Feb 19, 2016 · 2 comments
Closed

Cannot flush logs before process ends #52

JADurham909 opened this issue Feb 19, 2016 · 2 comments

Comments

@JADurham909
Copy link

I have noticed that when a process ends, not all the logs are written because they are still in the buffer. File transport has a flush event you can hook on to prevent this. This transport does not offer the same, so I have had to do something like this...

//allow papertrail to flush the buffer
setTimeout(() => {
    logger.info('lambda#handler: success');
    context.succeed('success');
}, 1000);
@jortizsao
Copy link

Yes, I have the same issue. Would be great if you can hook this flush event

@troy
Copy link
Contributor

troy commented Nov 16, 2016

This was implemented in #62 as the flushOnClose option.

@troy troy closed this as completed Nov 16, 2016
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

No branches or pull requests

3 participants