[jbosscache-commits] JBoss Cache SVN: r7118 - core/trunk/src/main/java/org/jboss/cache/jmx.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Tue Nov 11 18:29:14 EST 2008
Author: bstansberry at jboss.com
Date: 2008-11-11 18:29:13 -0500 (Tue, 11 Nov 2008)
New Revision: 7118
Modified:
core/trunk/src/main/java/org/jboss/cache/jmx/ResourceDMBean.java
Log:
Make logging guard levels consistent with level that is actually logged
Add some brackets around multi-line if block bodies
Modified: core/trunk/src/main/java/org/jboss/cache/jmx/ResourceDMBean.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/jmx/ResourceDMBean.java 2008-11-11 23:20:54 UTC (rev 7117)
+++ core/trunk/src/main/java/org/jboss/cache/jmx/ResourceDMBean.java 2008-11-11 23:29:13 UTC (rev 7118)
@@ -89,7 +89,7 @@
attrInfo = new MBeanAttributeInfo[atts.size()];
int i = 0;
- if (log.isInfoEnabled())
+ if (log.isTraceEnabled())
{
log.trace("Processing class " + instance.getClass());
log.trace("Number of attributes: " + atts.size());
@@ -99,7 +99,7 @@
{
info = entry.getInfo();
attrInfo[i++] = info;
- if (log.isInfoEnabled())
+ if (log.isTraceEnabled())
{
log.trace("Attribute " + info.getName()
+ "[r="
@@ -117,7 +117,7 @@
opInfo = new MBeanOperationInfo[ops.size()];
ops.toArray(opInfo);
- if (log.isInfoEnabled())
+ if (log.isTraceEnabled())
{
if (ops.size() > 0)
log.trace("Operations are:");
@@ -234,7 +234,7 @@
}
else
{
- if (log.isWarnEnabled())
+ if (log.isDebugEnabled())
{
log.debug("Failed to update attribute name " + attr.getName()
+ " with value "
@@ -306,10 +306,12 @@
if (!methodName.startsWith("get") && !methodName.startsWith("set")
&& !methodName.startsWith("is"))
{
- if (log.isWarnEnabled())
+ if (log.isWarnEnabled())
+ {
log.warn("method name " + methodName
+ " doesn't start with \"get\", \"set\", or \"is\""
- + ", but is annotated with @ManagedAttribute: will be ignored");
+ + ", but is annotated with @ManagedAttribute: will be ignored");
+ }
}
else
{
@@ -533,7 +535,8 @@
try
{
result = new Attribute(name, entry.invoke(null));
- if (log.isDebugEnabled())
+ if (log.isDebugEnabled())
+ {
log.debug("Attribute " + name
+ " has r="
+ i.isReadable()
@@ -542,7 +545,8 @@
+ ",is="
+ i.isIs()
+ " and value "
- + result.getValue());
+ + result.getValue());
+ }
}
catch (Exception e)
{
@@ -560,10 +564,12 @@
private boolean setNamedAttribute(Attribute attribute)
{
boolean result = false;
- if (log.isDebugEnabled())
+ if (log.isDebugEnabled())
+ {
log.debug("Invoking set on attribute " + attribute.getName()
+ " with value "
- + attribute.getValue());
+ + attribute.getValue());
+ }
AttributeEntry entry = atts.get(attribute.getName());
if (entry != null)
More information about the jbosscache-commits
mailing list