Author: jstrachan
Date: Wed Mar 14 08:45:16 2007
New Revision: 518191
URL: http://svn.apache.org/viewvc?view=rev&rev=518191
Log:
tidied up the logging to reduce clutter & make it easier for users to see the
URLs they can click on
Modified:
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java
Modified:
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java?view=diff&rev=518191&r1=518190&r2=518191
==============================================================================
---
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java
(original)
+++
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java
Wed Mar 14 08:45:16 2007
@@ -21,6 +21,8 @@
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 @@
*/
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 @@
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 @@
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]);
}
}
}
Modified:
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java?view=diff&rev=518191&r1=518190&r2=518191
==============================================================================
---
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java
(original)
+++
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java
Wed Mar 14 08:45:16 2007
@@ -235,7 +235,8 @@
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";