You need to sign in to do that
Don't have an account?
MarkL
Mass Delete ApexLog objects (not from the Developer Console)?
Is there any way to mass delete ApexLog objects that is not from the developer console? When you have around 800 of them the developer console takes forever to delete them and it looks like ApexLog objects can't be deleted via SOQL calls in APEX, so what's the alternative to sitting for 5 minutes waiting for my logs to clear off of a half frozen developer console?
Greetings to you!
You can use dataloader to export and delete all the debug logs. Also, there are some chrome extensions like Apex Debugger (https://chrome.google.com/webstore/detail/apex-debugger/mpckkbblhbfngaininanfjpdfjhbncjo?hl=en) which will help you in deleting logs.
Please refer to the below link which might help you further with the above requirement.
https://salesforce.stackexchange.com/questions/100401/delete-all-in-debug-log
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
You can use dataloader to export and delete all the debug logs. Also, there are some chrome extensions like Apex Debugger (https://chrome.google.com/webstore/detail/apex-debugger/mpckkbblhbfngaininanfjpdfjhbncjo?hl=en) which will help you in deleting logs.
Please refer to the below link which might help you further with the above requirement.
https://salesforce.stackexchange.com/questions/100401/delete-all-in-debug-log
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
https://help.salesforce.com/articleView?id=000194045&language=en_US&type=1
https://salesforce.stackexchange.com/questions/239636/how-to-delete-all-debug-apex-logs-in-apex
Data Loader seems to work fine but is a bit roundabout.
The code Raj posted works well but only works for 100 logs at a time and this limit doesn't seem to go away when running the code via batch apex. Is there an easier way to get this to clear ~800 logs at a time quickly?
1. Debug logs view from the Salesforce setup
2. Developer console
3. Workbench
more details from this article > https://www.codekiat.com/2022/11/how-to-delete-debug-logs-in-salesforce.html