Error getting while restarting Hw1.2

vagrant@database:~ mongod --dbpath M310-HW-1.2/r0 --logpath M310-HW-1.2/r0/mongodb.log --port 31120 --replSet TO_BE_SECURED --keyFile shared/mongodb-keyfile 2019-09-23T15:14:00.630+0000 I CONTROL [main] log file "/home/vagrant/M310-HW-1.2/r0/mongodb.log" exists; moved to "/home/vagrant/M310-HW-1.2/r0/mongodb.log.2019-09-23T15-14-00". vagrant@database:~

Please let me know why this error occurs.
Path already there

Hi @baishakhi_81883,

Because by default logappend is not set, and if the log file already exists, it will create a new one.

To resolve this, you need to set logappend option as well if you want to keep the logs appended or you can remove the existing log file and then this error will disappear.

Kanika