Question or issue on macOS:
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.
How to solve this problem?
Solution no. 1:
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
Solution no. 2:
From the mongo shell you can find the path for data, log and config using:
db.serverCmdLineOpts()
Solution no. 3:
As @dcrosta answered here: Sane defaults for MongoDB on OSX, MongoDB only have default values for the data path. All other locations shall be established by the user if desired.
In the installation process you posted here, can’t see any command to set the log path so, in conclusion, your MongoDB is not saving any log file.