-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Is there an existing issue that is already proposing this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe it
I use Jest and Jest has a feature where they buffer calls to console.*
. But they do not buffer calls to process.*.write.
We built a custom jest reporter to decide whether to show logs or not depending if a test case fails.
Unfortunately, all of the internal logs that I cant control (logs from kafka microservice or unhandled exceptions being logged), completely bypass jest and always get logged to the console
Describe the solution you'd like
Winston has an option in their console transport forceConsole
. If true, they use console.log, otherwise they use process.*.write
https://github.com/winstonjs/winston/blob/master/lib/winston/transports/console.js#L34
It would be great if there was an option in Nestjs that tells the console logger to use console.log instead of process.*.write
Teachability, documentation, adoption, migration strategy
You dont have to worry about backwards compatibility
What is the motivation / use case for changing the behavior?
described above