Friday 11 June 2021

MongoDB: --logpath: send log information to a file

‘--logpath' option send the log information to a file instead of stdout.

 

Example

mongod --port 8888 --dbpath /Users/Shared/data/db --logpath /Users/Shared/log/mongo.log

 

Make sure that the folder ‘/Users/Shared/log/’ exists.

 

Once you execute above command, mongo server starts writing all the log information to /Users/Shared/log/mongo.log file.

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment