keymetrics / pm2-io-apm

PM2.io APM for Node.JS
Apache License 2.0
147 stars 39 forks source link

PM2-io-apm always logs unhandledRejection and uncaughtException to error stream #277

Open Khez opened 3 years ago

Khez commented 3 years ago

Error stream is polluted with an intrusive log that can't be turned off or customised.

This happens when using PM2 in fork mode, as can be seen in my original issue: https://github.com/Unitech/pm2/issues/4913

Culprits:

Scouring the source code I found a couple of other places that use the console directly.

Each of these files use console in various places, but one might argue its okay.

Unlike features/notify.ts, these are user-land generated errors by invalid configuration and should never hit production.

Pull Request

Khez commented 3 years ago

ping @Unitech