Steps to delete MongoLogs

Following are the Steps to delete logs:

Go to path C:\Program Files\MongoDB\Server\4.2\bin\ 

And run the deleteLogMessagesLogs.js file.


Add the Batch file in Task Scheduler for auto cleanup: Run Removelogmessagescollection.bat

3. From the Task Scheduler , run the following job:


Files required: ( * change the extension from jsp to js and batt to bat )

  1. deleteLogMessagesLog
  2. Removelogmessagescollection


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.