‘--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.
No comments:
Post a Comment