All API calls that invoke Apex support a debug facility that allows access to detailed information about the execution of the code, including any calls to System.debug(). In addition to the Developer Console, a SOAP input header called DebuggingHeader allows you to set the logging granularity according to the levels outlined in the following table.
Element Name | Type | Description |
---|---|---|
LogCategory | string | Specify the type of information returned in the debug log.
Valid values are:
|
LogCategoryLevel | string | Specifies the level of detail returned in the debug log. Only the Apex_code LogCategory uses the log category levels. |
In addition, the following log levels are still supported as part of the DebuggingHeader for backwards compatibility.
Log Level | Description |
---|---|
NONE | Does not include any log messages. |
DEBUGONLY | Includes lower level messages, as well as messages generated by calls to the System.debug method. |
DB | Includes log messages generated by calls to the System.debug method, as well as every data manipulation language (DML) statement or inline SOQL or SOSL query. |
PROFILE | Includes log messages generated by calls to the System.debug method, every DML statement or inline SOQL or SOSL query, and the entrance and exit of every user-defined method. In addition, the end of the debug log contains overall profiling information for the portions of the request that used the most resources, in terms of SOQL and SOSL statements, DML operations, and Apex method invocations. These three sections list the locations in the code that consumed the most time, in descending order of total cumulative time, along with the number of times they were executed. |
CALLOUT | Includes the request-response XML that the server is sending and receiving from an external web service. Useful when debugging issues related to using Force.com web service API calls or troubleshooting user access to external objects via an OData adapter for Lightning Connect. |
DETAIL | Includes all messages generated by the PROFILE level as well as the following:
|
The corresponding output header, DebuggingInfo, contains the resulting debug log. For more information, see DebuggingHeader.