Hi Karthick,
As Eline mentioned, the issue is fixed in 11.12.2. Now Mendix automatically deletes log files older than 7 days. Unfortunatlly it is not there in below versions.
As of today there is no machanism implemented to set if to write log or not, or to change the retention period of logs.
You can do the following;
Below is the script I use;
$mendixLogPath = "$env:LOCALAPPDATA\Mendix\log"
Get-ChildItem -Path $mendixLogPath -Recurse -File -Filter "*.txt" |
Where-Object {
$_.Name -like "*log*" -and
$_.LastWriteTime -lt (Get-Date).AddDays(-7)
} |
Remove-Item -Force
Above will delete log files older than 7 days, you can modify it based on your requirements.
Below is what needs to be added in arguments;
-ExecutionPolicy Bypass -File "filepath of the created MendixLogCleanUp.ps1"
Hope my answer helps. Reach me out for any queries.
This happens to be something they fixed in 11.12.2, it seems:
We now delete the log files generated by Studio Pro that are older than 7 days.
It's not quite every few hours, but it's better than never clearing them, I suppose.
It might also be worth investigating why you're producting so many logs that it makes such a big difference in just 2 hours.