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

Close not working as expected in a lambda #101

Open
cipriancaba opened this issue Nov 18, 2022 · 0 comments
Open

Close not working as expected in a lambda #101

cipriancaba opened this issue Nov 18, 2022 · 0 comments

Comments

@cipriancaba
Copy link

Describe the bug
When running logzio in an AWS lambda I did the logger.close() at the end of the execution as I was instructed.

However, if you close the logger and the lambda gets reused, the logger is closed and won't ship any more logs and will error with Attempt to write logs with no transports, which can increase memory usage

To Reproduce
Steps to reproduce the behavior:

  1. Run a lambda and initialize the logger
  2. Run close() at the end of the execution as instructed per docs
  3. Next warm execution of the lambda will fail logging

Expected behavior
Replace close with a flush that will instruct flushing the current batch of logs

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

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

1 participant