From 387fe57771ed6af6e7042c18e91b24097384c9b2 Mon Sep 17 00:00:00 2001 From: Edison Su Date: Wed, 1 Aug 2012 16:54:33 -0700 Subject: [PATCH] don't log null response --- agent/src/com/cloud/agent/Agent.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) {