winston-cloudwatch
winston-cloudwatch copied to clipboard
Calling 'kthxbye' while an event is being posted will cause events to be missed
Because lib/cloudwatch-integration.js
line 20, the callback is called, if this comes from kthkbye
, the transport is silently "closed" while events might still be waiting.
kthxbye
has been added for scenarios like AWS Lambda, when at a certain point in time you are done and want to just exit.
What is your use case?
My use case is a short running Docker container, pretty similar to Lambda. I would also like the process to exit at some point, but I'd like to be sure all the log events have been sent.
Yes you are right, we should not just randomly discard events, I will think of a possibile solution for this.
I opened https://github.com/lazywithclass/winston-cloudwatch/pull/118 for this