[Improve](common)Optimize logging performance with LOG.isDebugEnabled() (#31091)
* [Improve](common)Optimize logging performance with LOG.isDebugEnabled() * fix error ut
This commit is contained in:
@ -202,7 +202,9 @@ public class JMXJsonUtil {
|
||||
} catch (RuntimeErrorException e) {
|
||||
// RuntimeErrorException happens when an unexpected failure occurs in getAttribute
|
||||
// for example https://issues.apache.org/jira/browse/DAEMON-120
|
||||
LOG.debug("getting attribute " + attName + " of " + oname + " threw an exception", e);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("getting attribute " + attName + " of " + oname + " threw an exception", e);
|
||||
}
|
||||
return;
|
||||
} catch (AttributeNotFoundException e) {
|
||||
//Ignored the attribute was not found, which should never happen because the bean
|
||||
|
||||
Reference in New Issue
Block a user