pinojs / pino-mongodb

:evergreen_tree: Insert JSON from stdin into MongoDB
MIT License
54 stars 18 forks source link

fix: pipe option -o #118

Closed Tarrask closed 2 years ago

Tarrask commented 2 years ago

This is a fix for issue https://github.com/pinojs/pino-mongodb/issues/76. In mongodb 4, the result object returned by insertOne does not contain the ops array anymore.

This fix use the original log object of the insert function to output it on the console when the -o option is defined