winston-cloudwatch icon indicating copy to clipboard operation
winston-cloudwatch copied to clipboard

winston end command, don't flush on AWS

Open ordimans opened this issue 3 years ago • 3 comments

Hello

I think I am using the module incorrectly.

I send the logs to AWS, except at the end of my main function I have this

 logger.on('finish', () => {
         process.exit();
     });

logger.end()

and in this case, the traces are not pushed to AWS.

If I put

setTimeout(() => {logger.end()},5000)

It works. If I don't put

logger.end() ,the end of the program never happens.

ordimans avatar Mar 06 '22 19:03 ordimans

+1

zwezheng avatar Apr 12 '22 07:04 zwezheng

+1

harithzainudin avatar Sep 11 '22 10:09 harithzainudin

I will also look into this as part of #193 work.

lazywithclass avatar Sep 11 '22 14:09 lazywithclass