logdna / logdna-winston

LogDNA's Node.js logging module with support for Winston
MIT License
16 stars 14 forks source link

Ensure the logs are sent to the LogDNA platform in serverless functions environment #38

Open hamboomger opened 2 years ago

hamboomger commented 2 years ago

I use the logdna-winston transport inside of a Firebase Functions environment and I need some way to ensure that the logs are sent to the server before the function execution is finished. First thing that came to my mind is to set the flushLimit: 0 in the options, but that's rather a hack then a true solution (and I'm not sure it will even work). I know there's also flush() method from the @logdna/logger library, but I have no idea if I can access this method from the logdna-winston transport.

hamboomger commented 2 years ago

I could also use the cleared flag from @logdna/logger library, but I'm not sure how can I access this flag as well