Skip to content

Commit

Permalink
ZOOKEEPER-2822: Wrong ObjectName about MBeanServer in JMX module
Browse files Browse the repository at this point in the history
  • Loading branch information
asdf2014 committed Jun 27, 2017
1 parent a0eba7a commit 8654cc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/java/main/org/apache/zookeeper/jmx/ManagedUtil.java
Expand Up @@ -33,13 +33,13 @@
public class ManagedUtil {
private static final Logger LOG = LoggerFactory.getLogger(ManagedUtil.class);

private static final boolean isLog4jJmxEnabled() {
private static boolean isLog4jJmxEnabled() {
boolean enabled = false;

try {
Class.forName("org.apache.log4j.spi.LoggerRepository");

if (Boolean.getBoolean("zookeeper.jmx.log4j.disable") == true) {
if (Boolean.getBoolean("zookeeper.jmx.log4j.disable")) {
LOG.info("Log4j found but jmx support is disabled.");
} else {
enabled = true;
Expand Down Expand Up @@ -71,7 +71,7 @@ public static void registerLog4jMBeans() throws JMException {
// org.apache.log4j.jmx.HierarchyDynamicMBean hdm = new org.apache.log4j.jmx.HierarchyDynamicMBean();
Object hdm = Class.forName("org.apache.log4j.jmx.HierarchyDynamicMBean").newInstance();

ObjectName mbo = new ObjectName("log4j:hiearchy=default");
ObjectName mbo = new ObjectName("log4j:hierarchy=default");
mbs.registerMBean(hdm, mbo);

// Add the root logger to the Hierarchy MBean
Expand Down

0 comments on commit 8654cc0

Please sign in to comment.