Skip to content

Commit 61f3a37

Browse files
vorburgerFaseela K
authored and
Faseela K
committed
fix logging of (supposedly) "CRITICAL" condition
if it's "CRITICAL", it most probably better be LOG.error() instead info, and it would REALLY help to have the cause included; see also KengoTODA/findbugs-slf4j#74. actually, perhaps this really should re-throw... let me propose that in a follow-up change, and we can discuss if there is any reason to only go half the way or merge both steps. Change-Id: Ie824d8e8b1155c6bfd604dd83da2969c4d9cdb33 Signed-off-by: Michael Vorburger <vorburger@redhat.com>
1 parent 2973a58 commit 61f3a37

File tree

1 file changed

+2
-2
lines changed
  • diagstatus/api/src/main/java/org/opendaylight/infrautils/diagstatus

1 file changed

+2
-2
lines changed

diagstatus/api/src/main/java/org/opendaylight/infrautils/diagstatus/MBeanUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public static Object invokeMBeanFunction(String objName, String functionName) {
134134
MBeanServer mplatformMbeanServer = ManagementFactory.getPlatformMBeanServer();
135135
udpated = mplatformMbeanServer.invoke(objectName, functionName, null, null);
136136
} catch (InstanceNotFoundException | MBeanException | ReflectionException | MalformedObjectNameException t) {
137-
LOG.info("CRITICAL : Exception in executing MBean function");
137+
LOG.error("CRITICAL : Exception in executing MBean function", t);
138138
}
139139
return udpated;
140140
}
@@ -148,7 +148,7 @@ public static Object readMBeanAttribute(String objName, String attribute) {
148148
attributeObj = platformMbeanServer.getAttribute(objectName, attribute);
149149
} catch (AttributeNotFoundException | InstanceNotFoundException | MBeanException
150150
| ReflectionException | MalformedObjectNameException t) {
151-
LOG.info("CRITICAL : Exception in executing MXBean function");
151+
LOG.error("CRITICAL : Exception in executing MXBean function", t);
152152
}
153153
return attributeObj;
154154
}

0 commit comments

Comments
 (0)