How to change the MongoDB log file location in Windows?

mongodb
windows
(Dmitry Fedyuk) #1

The MongoDB log file location is set in the MongoDB configuration file in the systemLog section via the path option, e.g.:

systemLog:
  destination: file
  logAppend: true
  path:  C:\server\mongodb\log\mongod.log

If you change the option, then restart the MongoDB service.

0 Likes

Where is the MongoDB log file located in Windows?