The main log file is the mongod.log
. You can specify the log file location when you are starting the mongod process but if you have installed on Ubuntu from a package then you log file will normally be located in /var/log/mongodb/mongod.log
.
You can tail the log file using:
tail -f /var/log/mongodb/mongod.log
From the Mongo shell you can also view the log file using:
show logs