function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Andy BaconAndy Bacon 

Apex Logs 10GB+ Cannot access or delete

Our SF interface says we have 9.9GB of Apex Logs in the system and it's taking us way over our data allowance. We have no way of accessing them or deleting them from the interface or Apex. I've come across various posts e.g. soql 'select ID from apexlogs' and delete etc but none of them work. Does anyone know how to access / delete these logs? As i'm new to SF i'm either missing something obvious or they have.
pbattissonpbattisson
Hi Andy

Are you sure when running that command in the Developer Console you have got the Tooling API turned on? The help and trainng article here (https://help.salesforce.com/apex/HTViewSolution?id=000194045&language=en_US) can provide more info, but effectively the query and delete for apex logs only works if the Tooling API is used (the checkbox for this is right at the bottom of the developer console screen).

Paul
Andy BaconAndy Bacon
Hey Paul thanks for your hasty response. I did check 'Use Tooling API' in the first instance as per the tute and it returns an empty result set, Total Rows = 0. 9.9GB in the gui, nothing in Apex.
pbattissonpbattisson
Hey,

Could you post a screen shot of the GUI view? I have just tried and is working for me so want to see what you are seeing.

Thanks

Paul
Andy BaconAndy Bacon
Sure, please see screener below
User-added image
pbattissonpbattisson
Ah, I meant the GUI one saying you have 0.99GB of them in usage.
Andy BaconAndy Bacon
Here it is, thannks again for yout time.
User-added image
pbattissonpbattisson
Okay, so I have spent some time reviewing and have come to one of 2 conclusions, either you have a custom logging object (also called apex log) which is eating up this memory or you have a bug. Assuming it is not the first I would recommend you reach out to Salesforce support to ask them to assist you. Sorry I can't be of more help.
Andy BaconAndy Bacon

Thanks Paul, i'll check in with SF but despite an enthusiastic account manager unless your premium it's like bloood from a stone.