Where is log file of mongodb in mac

后端 未结 3 455
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-01 17:42

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 mongod         


        
相关标签:
3条回答
  • From the mongo shell you can find the path for data, log and config using:

       db.serverCmdLineOpts()
    
    0 讨论(0)
  • 2021-02-01 18:28

    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
    
    0 讨论(0)
  • 2021-02-01 18:31

    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.

    0 讨论(0)
提交回复
热议问题