Gotta rotate those log files, or they'll eventually eat up all of your disk space. Start with some research...
mongodb-log-file-growth
rotate-log-files
Log files can be viewed with the following command...
ls /var/log/mongodb/
But to set up log-file rotation, you'll need to do the following...
// put the following in the /etc/logrotate.d/mongod file
/var/log/mongo/*.log {
daily
rotate 30
compress
dateext
missingok
notifempty
sharedscripts
copytruncate
postrotate
/bin/kill -SIGUSR1 `cat /var/lib/mongo/mongod.lock 2> /dev/null` 2> /dev/null || true
endscript
}
// to manually initiate a log file rotation, run from the Mongo shell
use admin
db.runCommand( { logRotate : 1 } )