Newer Version Available
DebuggingHeader
Specifies that the deployment result will contain the debug log output, and specifies
the level of detail included in the log. The debug log contains the output of Apex tests that are
executed as part of a deployment.
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 | LogInfo (enumeration of type string) | This field has been deprecated and is only provided for backward
compatibility. This 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
| Field Name | Type | Description |
|---|---|---|
| category | LogCategory (enumeration of type string) | The category of operations for which to specify a debug log
level. Valid values are:
|
| level | LogCategoryLevel (enumeration of type string) | A log level that specifies how much information is logged for each category. |
Sample Code—Java
Add the DebuggingHeader to the metadata connection before you perform the deploy() call as follows:
1LogInfo[] logs = new LogInfo[1];
2logs[0] = new LogInfo();
3logs[0].setCategory(LogCategory.Apex_code);
4logs[0].setLevel(LogCategoryLevel.Fine);
5metadataConnection.setDebuggingHeader(logs, LogType.Detail);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 an output header, DebuggingInfo, in the debugLog field of this header.