tidied up the logging to reduce clutter & make it easier for users to see the URLs they can click on

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@518191 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2007-03-14 15:45:16 +00:00
parent 0315016d37
commit 4443d32e5d
2 changed files with 11 additions and 4 deletions

View File

@ -21,6 +21,8 @@ package org.apache.activemq.web;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
@ -49,6 +51,8 @@ import java.util.Map;
*/
public abstract class MessageServletSupport extends HttpServlet {
private static final transient Log log = LogFactory.getLog(MessageServletSupport.class);
private boolean defaultTopicFlag = true;
private Destination defaultDestination;
private String destinationParameter = "destination";
@ -69,7 +73,9 @@ public abstract class MessageServletSupport extends HttpServlet {
defaultTopicFlag = asBoolean(name);
}
log("Defaulting to use topics: " + defaultTopicFlag);
if (log.isDebugEnabled()) {
log.debug("Defaulting to use topics: " + defaultTopicFlag);
}
name = servletConfig.getInitParameter("destination");
if (name != null) {
@ -137,10 +143,10 @@ public abstract class MessageServletSupport extends HttpServlet {
value = array[0];
}
else {
log("Can't use property: " + name + " which is of type: " + value.getClass().getName() + " value");
log.warn("Can't use property: " + name + " which is of type: " + value.getClass().getName() + " value");
value = null;
for (int i = 0, size = array.length; i < size; i++) {
log("value[" + i + "] = " + array[i]);
log.debug("value[" + i + "] = " + array[i]);
}
}
}

View File

@ -235,7 +235,8 @@ public class WebClient implements HttpSessionActivationListener, HttpSessionBind
if (factory == null) {
String brokerURL = servletContext.getInitParameter(brokerUrlInitParam);
servletContext.log("Value of: " + brokerUrlInitParam + " is: " + brokerURL);
log.debug("Value of: " + brokerUrlInitParam + " is: " + brokerURL);
if (brokerURL == null) {
brokerURL = "vm://localhost";