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

Console.log are also logged to CloudWatch

Open tgouala opened this issue 4 years ago • 1 comments

Hello, Is there an option to log to cloudwatch only what is logged with Pino logger ? It seems that my calls to console.log are also logged to CloudWatch.

tgouala avatar Aug 17 '20 12:08 tgouala

Hello,

Unfortunately this is the 'feature' of Pino, that is the transports are simply taking stdin and sending to CloudWatch. It keeps it simple, which has its drawbacks.

So any console.logs() would be transferred.

You might be able to use console.error() instead of console.log() since it wouldn't go to the stdin of pino-cloudwatch.

Someone may have a better idea though.

dbhowell avatar Aug 18 '20 22:08 dbhowell