MongoDB Log windows version how I can save by per date in a each files

hi guys,

I need help for my log files is growing and is just only have 1 log file without separate it by per date.

how I can setting up the log with per date save it?

thanks.

Hi @Kelvin_Shee, welcome to the community!

LogRorate command can be used to rename old log file and create new one. Check out the doc for more details.

So, in your case, you could run this command to rotate log based on your schedule.

use admin
db.runCommand( { logRotate: 1} )

Thanks,
Mahi