setDebug
setDebug(String sessionID, boolean debug)
setDebug 方法使您可以为会话的所有代码路径设置记录详细级别。
*
sessionID - 用于标识会话标识的字符串。
*
debug - 用于启用或禁用调试信息的布尔值。 有效值为 truefalse。如果为 true,那么 Interact 会将调试信息记录到运行时服务器日志。
返回值
运行时服务器对应于 setDebug,后者包含填充了以下属性的 Response 对象:
*
*
*
*
示例
以下示例说明了更改会话的调试级别。
sessionId 是相同字符串,用于标识启动此会话的 startSession 调用所使用的会话。
boolean newDebugFlag=false;
/** make the call */
response = api.setDebug(sessionId, newDebugFlag);

/** Process the response appropriately */
// check if response is successful or not
if(response.getStatusCode() == Response.STATUS_SUCCESS)
{
System.out.println("setDebug call processed with no warnings or errors");
}
else if(response.getStatusCode() == Response.STATUS_WARNING)
{
System.out.println("setDebug call processed with a warning");
}
else
{
System.out.println("setDebug call processed with an error");
}

// For any non-successes, there should be advisory messages explaining why
if(response.getStatusCode() != Response.STATUS_SUCCESS)
printDetailMessageOfWarningOrError("setDebug",
response.getAdvisoryMessages());