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
1
vote
Carlos
shared this idea
-
Wernfried commented
Use the system logrotate: https://linux.die.net/man/8/logrotate
There you have various options.