DebuggingHeader
Version
This header is available in all API versions.
Supported Calls
Fields
Field Name | Type | Description |
---|---|---|
categories | LogInfo[] | A list of log categories with their associated log levels. |
debugLevel | LogType (enumeration of type string) |
Deprecated. This field is provided only for backward compatibility. If you provide values for both debugLevel and categories, the categories value is used. The debugLevel field specifies the type of information returned in the debug log. The values are listed from the least amount of information returned to the most information returned. Valid values include:
|
LogInfo
Specifies the type and amount of information to be returned in the debug log. The categories field takes a list of these objects. LogInfo is a mapping of category to level.
Element Name | Type | Description |
---|---|---|
category | LogCategory | Specify the type of information returned in the debug log. Valid values are:
|
level | LogCategoryLevel | Specifies the level of detail returned in the debug log. |
Sample Code—Java
Add the DebuggingHeader to the metadata connection before you perform the deploy() call as follows.
LogInfo[] logs = new LogInfo[1];
logs[0] = new LogInfo();
logs[0].setCategory(LogCategory.Apex_code);
logs[0].setLevel(LogCategoryLevel.Fine);
metadataConnection.setDebuggingHeader(logs);
The result of the deploy() call is obtained by calling checkDeployStatus(). After the deployment finishes, and if tests were run, the response of checkDeployStatus() contains the debug log output in the debugLog field of a DebuggingInfo output header.