Skip to content
Permalink
Browse files

Added some debug logging.

  • Loading branch information...
csrster committed Aug 5, 2016
1 parent 9a0aa38 commit 2404ae8330acfe916a2a4b031f4155812148e560
@@ -38,6 +38,9 @@
import javax.management.ObjectName;
import javax.management.RuntimeMBeanException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import dk.netarkivet.common.exceptions.ArgumentNotValid;
import dk.netarkivet.common.utils.ExceptionUtils;
import dk.netarkivet.common.utils.I18n;
@@ -49,6 +52,10 @@
* Implementation of StatusEntry, that receives its data from the MBeanServer (JMX).
*/
public class JMXStatusEntry implements StatusEntry {

private static final Logger log = LoggerFactory.getLogger(JMXStatusEntry.class);


/** The ObjectName assigned to the MBean for this JMXStatusEntry. */
private ObjectName mBeanName;
/** JMX Query to retrieve the logmessage associated with this Entry. */
@@ -293,11 +300,13 @@ public int compareTo(StatusEntry o) {
HostForwarding.getInstance(SingleLogRecord.class, mBeanServer, LOGGING_QUERY);
// The "null" in this case is used to indicate no further filters on the
// query.
log.debug("Querying " + mBeanServer.toString());
Set<ObjectName> resultSet = mBeanServer.queryNames(new ObjectName(query), null);
for (ObjectName objectName : resultSet) {
entries.add(new JMXStatusEntry(objectName));
}
Collections.sort(entries);
log.debug("Query returned " + entries.size() + " results.");
return entries;
}

@@ -36,6 +36,9 @@
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import dk.netarkivet.common.exceptions.ArgumentNotValid;
import dk.netarkivet.common.exceptions.ForwardedToErrorPage;
import dk.netarkivet.common.utils.DomainUtils;
@@ -51,6 +54,10 @@
* Monitor-JMXsummary.jsp.
*/
public class JMXSummaryUtils {

private static final Logger log = LoggerFactory.getLogger(JMXSummaryUtils.class);


/** JMX property for remove application button. */
public static final String JMXRemoveApplication = dk.netarkivet.common.management.Constants.REMOVE_JMX_APPLICATION;
/** JMX property for the physical location. */
@@ -281,6 +288,7 @@ public static String generateLink(StarredRequest request, String setPart, String
String query = null;
try {
query = createJMXQuery(parameters, request);
log.debug("Executing JMX query: " + query);
return JMXStatusEntry.queryJMX(query);
} catch (MalformedObjectNameException e) {
if (query != null) {

0 comments on commit 2404ae8

Please sign in to comment.
You can’t perform that action at this time.