logdna-winston
logdna-winston copied to clipboard
Ensure the logs are sent to the LogDNA platform in serverless functions environment
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.
I could also use the cleared
flag from @logdna/logger
library, but I'm not sure how can I access this flag as well