Reputation: 341
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.
Upvotes: 34
Views: 24988
Reputation: 2843
With the default mongodb-community homebrew installation on a Macbook Pro with Apple Silicon, the logs are with the rest of the homebrew services logs, at /opt/homebrew/var/log
. I think the location is different with Intel silicon, but the concept should be the same.
Upvotes: 3
Reputation: 722
From the mongo shell you can find the path for data, log and config using:
db.serverCmdLineOpts()
Upvotes: 18
Reputation: 22156
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
Upvotes: 55
Reputation: 399
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.
Upvotes: 2