CLOUDSTACK-505: Added string cleaning to the start and end debug

log statements within the API servlet.
This commit is contained in:
Chip Childers 2012-12-17 15:13:59 -05:00
parent 44da7b1841
commit ba30500402

View File

@ -36,6 +36,7 @@ import com.cloud.server.ManagementServer;
import com.cloud.user.Account;
import com.cloud.user.AccountService;
import com.cloud.user.UserContext;
import com.cloud.utils.StringUtils;
import com.cloud.utils.component.ComponentLocator;
import com.cloud.utils.exception.CloudRuntimeException;
@ -126,7 +127,7 @@ public class ApiServlet extends HttpServlet {
String reqStr = "";
if (s_logger.isDebugEnabled()) {
reqStr = auditTrailSb.toString() + " " + req.getQueryString();
s_logger.debug("===START=== " + reqStr);
s_logger.debug("===START=== " + StringUtils.cleanString(reqStr));
}
try {
@ -343,7 +344,7 @@ public class ApiServlet extends HttpServlet {
} finally {
s_accessLogger.info(auditTrailSb.toString());
if (s_logger.isDebugEnabled()) {
s_logger.debug("===END=== " + reqStr);
s_logger.debug("===END=== " + StringUtils.cleanString(reqStr));
}
// cleanup user context to prevent from being peeked in other request context
UserContext.unregisterContext();