I have installed the mongodb in my server and i have added the log rotation policy in the mongod.conf where
systemLog: destination: file logAppend: true logRotate: reopen path: /var/log/mongodb/mongod.log I have also installed the logrotate in my server and added the policy in this
sudo nano /etc/logrotate.d/mongodb /var/mongodb/log/*.log { rotate 10 daily dateext dateformat %Y-%m-%d-%s dateyesterday size 10000M missingok create 600 mongodb mongodb delaycompress compress sharedscripts postrotate /bin/kill -SIGUSR1 $(cat /var/run/mongodb.pid) endscript } I have given the permissions to mongodb as well , file is being created but the logs are not there in those files
I tried giving the permission to logs of mongodb but still no success