logRotatecommand is an administrative command that allows you to rotate the MongoDB logs to prevent a single logfile from consuming too much disk space.
Changed in version 3.0.0.
--logRotate are set to
logRotate follows the typical Linux/Unix behavior, and simply closes the log file, and then reopens a log file with the same name. With
mongod expects that another process renames the file prior to the rotation, and that the reopen results in the creation of a new file.