Maximum log level exceeded in Developer Console
I believe I saw the fix to this on SFSE, but can't seem to find it now. When having this issue, run this query in your Query Editor
:
SELECT Id FROM ApexLog
Then simply delete all rows.
The short term solution is to keep playing whack-a-mole~ApexLog as Adrian has suggested.
Longer term, the problem comes back to the Summer'18 update Store Larger Debug Logs with Changed Log Limits:
We increased the size limit for debug logs from 2 MB per log to 5 MB. You can store up to 250 MB of debug logs at a time. System logs are now deleted automatically after 24 hours instead of after seven days. Monitoring logs are still saved for seven days.
This is also compounded with the Winter '18 update Retain More Debug Logs for Longer:
We changed the way that we delete old debug logs. We now retain debug logs for 7 days. You can generate a total of 250 MB of debug logs in a 15-minute window. When your org is upgraded to Winter ’18, all logs that are at least 7 days old are deleted. This change applies to both Lightning Experience and Salesforce Classic.
Previously, you could generate up to 50 MB of debug logs. We kept them indefinitely, deleting the oldest log each time that you exceeded the limit. We removed the 50 MB limit and changed to a 7-day storage limit.
A couple of releases ago you had Apex logs up to 2 MB in size with a total limit of 50 MB that would automatically drop the older logs.
Currently (Winter '18) you have logs up to 5 MB in size with a total limit of 250 MB that can stay around for up to 7 days before being automatically purged. As many are finding, in a busy org it is easy to hit that 250 MB limit in a much shorter time period than 7 days.
I've created the idea Allow TraceFlags to indicate that Debug logs can be deleted automatically. The idea is to give the developer/admin control how how long they need the corresponding logs to stay around for. With a TTL (Time to Live) setting on each generated log they could be cleared out automatically while still giving the flexibility to capture a few large short term logs or smaller logs with a longer life span.
Nathan Totten is the current PM for this area an is aware of the issues it is causing - https://twitter.com/ntotten/status/1007432141725224960