Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories MongoDB Shell
Created by Guest
Created on Jul 6, 2021

Add a command to change date format when logrotate is used

After testing db.adminCommand( { logRotate : 1 } ), the following file was generated: /var/log/mongodb/mongod.log.2021-07-05T15-09-17. It would be good to add command to change date format. E.g. yyyymmdd-hhmmss and also it could be specified as variable in mongod.conf
  • Guest
    Oct 14, 2022
    Use the system logrotate: https://linux.die.net/man/8/logrotate There you have various options.