Reading and Interpreting Salesforce Apex Debug Logs
What's in an Apex Debug Log
An Apex debug log is pipe-delimited. Each line has a nanosecond timestamp, an event type, and event data:
03:21:05.0 (1234567)|METHOD_ENTRY|[5]|01p|MyClass.myMethod()
Key event types:
EXECUTION_STARTED/EXECUTION_FINISHEDCODE_UNIT_STARTED/CODE_UNIT_FINISHEDMETHOD_ENTRY/METHOD_EXITSOQL_EXECUTE_BEGIN/SOQL_EXECUTE_ENDDML_BEGIN/DML_ENDEXCEPTION_THROWN/FATAL_ERROR
Rendering the Tree
Because method and code-unit entries nest, the log is best read as a tree. Paste it into the FormatHub Salesforce Log Cleaner to get an indented, icon-enhanced hierarchy.