How to manage mongodb log file

We are using MongoDB 4.0.4 version for our project. The database configuration is done as below:

  1. Created a custom database in MongoDB and the service is running in authentication mode.
  2. Using Windows systems (Server and Desktop both)
    We have observed that the MongoDB log file size gets increased over the period and consumes disk space in GBs. Mongo creates a new log file only after the MongoDB service is rebooted. Due to the large size issue, we want to do either:
  3. Control the entries in the log file (We have tried by setting different verbose levels)
  4. Use logrotate command (The command doesn’t work on Windows as intended, though we have read it on forums that it supports only Linux)
  5. Delete log files (We can manually delete all log files, but when we try to delete it programmatically through windows service, it only deletes backup files, but the active file gives an error as file in use)
    Is there any other solution that we can try? Thanks in advance.

Check this link.May help