[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:
Calvin Kirs
2024-02-19 23:43:33 +08:00
committed by yiguolei
parent 4c34ebb1cf
commit 02bded2688
370 changed files with 2702 additions and 1309 deletions

View File

@ -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