I installed mongodb in my mac and following is the way I installed. Where is my mongodb log file located?
$ tar xzf mongodb-osx-x86_64-2.2.3.tgz $ sudo mv mongodb-osx-x86_64-2.2.3 /usr/local/mongodb $ sudo mkdir -p /data/db $ sudo chown 'whoami' /data/db $ vim .bash_profile export MONGO_PATH=/usr/local/mongodb export PATH=$PATH:$MONGO_PATH/bin
Where is the settings file of mongodb located which stores all this information.
As part of normal operation, MongoDB maintains a running log of events, including entries such as incoming connections, commands run, and issues encountered. Generally, log messages are useful for diagnosing issues, monitoring your deployment, and tuning performance.
Once you are assured that your MongoDb directory has all the required permissions, open the terminal application on your Mac and type the command, ~/mongodb/bin/mongod to start the Mongo Server. In another terminal window, type the command ~/mongodb/bin/mongo in order to start the Mongo Shell.
Let's take a look at the latest format for MongoDB errors which you can find by looking at your MongoDB log file which is commonly located at /var/log/mongodb/mongodb. log . If the file's not there, you'll need to find your mongodb. conf file which specifies where your log file lives.
I installed mongo with brew, and it was located at /usr/local/var/log/mongodb/mongo.log
I found it by running
find / -name mongo.log
From the mongo shell you can find the path for data, log and config using:
db.serverCmdLineOpts()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With