Updated 14 October 2025
A debug log records data base operations, system process, and errors that occur when executing a transaction or while running unit tests. We can monitor specific users in log by adding them to list of Monitored Users.

A salesforce debug log includes a header, execution units, code units, log lines, and other log data
You can also specify one of the following logging levels, The levels are listed from lowest to highest
NONEERRORWARNINFODEBUGFINEFINERFINESTThese levels run from lowest to highest and are cumulative. So if you pick the finest level, you get all messages that are logged as error, warn, info, and so on. There are also several debug log categories, and the amount of information logged depends on the log level
Each debug log must be 20 MB or smaller. If it exceeds this amount, you won’t see everything you need. Additionally, each org can retain up to 1,000 MB of logs. The oldest logs are overwritten.
System debug logs are retained for 24 hours. Monitoring logs are retained for seven days
When salesforce org too many logs, we need to delete some or all of your system logs and monitoring logs to create new log
for deleting log Use the Developer Console’s Query Editor to find and delete the logs using Tooling API.
SELECT Id, StartTime, LogUserId, LogLength, Location FROM ApexLog
Welcome back! Please enter your details
One or more fields have an error. Please check and try again.
Don’t have an account? Sign up
How can we help you with your business?
Your email address will not be published. Required fields are marked *