Change SharePoint log retention period
If, like me, you’ve found that your SharePoint log files have become rather large then you can configure the retention period in order to reduce the amount of space they consume. This can be done with a few clicks in the Central Administration:
1. Log in to the Central Administration
2. Navigate to Monitoring –> Configure Diagnostic Logging
3. Under the Trace Log section change the value for the number of days to store log files and, optionally, restrict the amount of disk space usage for the log files, and click OK
Alternatively, you can do this using stsadm.exe by opening an elevated command prompt and running the following command:
“C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\bin\STSADM.EXE” -O SetProperty -PN Change-Log-Retention-Period –PV 14
Note: just change the Property Value from 14 to the desired number of days to retain the logs.