Home > Back-end >  zsh terminal output show key value when run mongod
zsh terminal output show key value when run mongod

Time:07-10

I am installing and using mongodb. However during the execution of the mongod command the output displayed on zsh is really too annoying to my eyes. They are displayed as key values, not as complete sentences. How can I fix this. I am using Macbook Pro M1. Default terminal runs with zsh.

Please help me! Thanks!

enter image description here

CodePudding user response:

Starting from mongod 4.4 the log messages are sent in JSON format as explained here , you may use jq to parse this logs to more suitable console format.

Example:

cat mongod.log | tail -1 | jq

Some more examples on parsing mongo log messages can be found here

  • Related