Logger - MongoDB

MongoDB

  1. Edit the MongoDB configuration file:

    sudo nano /etc/mongod.conf
    
  2. Add or modify the following settings:

    systemLog:
      destination: file
      path: /var/log/mongodb/mongod.log
      logAppend: true
    operationProfiling:
      mode: all
    
  3. Restart MongoDB:

    sudo systemctl restart mongod