diff --git a/agent/src/com/cloud/agent/Agent.java b/agent/src/com/cloud/agent/Agent.java index 6db97aa9245..4bfd0765161 100755 --- a/agent/src/com/cloud/agent/Agent.java +++ b/agent/src/com/cloud/agent/Agent.java @@ -542,7 +542,10 @@ public class Agent implements HandlerFactory, IAgentControl { response = new Response(request, answers); } finally { if (s_logger.isDebugEnabled()) { - s_logger.debug(response != null ? response.toString() : "response is null"); + String responseMsg = response.toString(); + if (responseMsg != null) { + s_logger.debug(response.toString()); + } } if (response != null) {