-
Notifications
You must be signed in to change notification settings - Fork 50
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
Include async call to close/flush LoggingWinston to use in Cloud Functions #598
Comments
@dan-sproutward did chrismaree's pull request fix this issue? |
@SurferJeffAtGoogle just saw your comment. my request was based on observations that we seemed to be dropping logging. I will need to revisit this and that won't happen for a little bit - I am in the weeds and had moved on from the codebase using this functionality. However, now that I know, I will get this back on my plate to see if it is making a difference. Thanks for the heads up. |
Thanks @dan-sproutward for raising this issue. |
@dan-sproutward , another way to resolve this issue is to expose the LogSync class as additional winston transport in this library. |
@dan-sproutward , I believe that 676 provides a good alternative solution for this issue - please let me know if that helps. Closing this issue for now - feel free to reopen or comment if you have any issues. |
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is your feature request related to a problem? Please describe.
Logging is dropped if a Cloud Function shuts down before LoggingWinston flushes.
Describe the solution you'd like
Asynchronous call that can be used to wait for LoggingWinston to flush before exiting function processing event(thread?).
Describe alternatives you've considered
Created a Promise that calls close() and end() and listens for finish before returning. This is not reliable and logging is still dropped.
Additional context
It is not clear to me how to flush LoggingWinston successfully. Calling close and end was a guess to force flush before exiting a function. This is not reliable.
The text was updated successfully, but these errors were encountered: