How to disable console.logs?

Hamid Alaei V. shared this question 2 years ago
Answered

The logs that are automatically printed into the console after insert() and update() seem to slow down performance. Is there a way to disable them?

Comments (1)

photo
1

There is not way to turn off these logs for insert and update. To be compatible with the mongo shell, both methods call print internally.

There is a work-around solution, use insertOne/InsertMany and updateOne/updateMany to replace insert/update method.