Github user eolivelli commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/294#discussion_r234984710
  
    --- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/jmx/ManagedUtil.java ---
    @@ -69,9 +69,13 @@ public static void registerLog4jMBeans() throws 
JMException {
                 try {
                     // Create and Register the top level Log4J MBean
                     // org.apache.log4j.jmx.HierarchyDynamicMBean hdm = new 
org.apache.log4j.jmx.HierarchyDynamicMBean();
    -                Object hdm = 
Class.forName("org.apache.log4j.jmx.HierarchyDynamicMBean").getDeclaredConstructor().newInstance();
    +                Object hdm = 
Class.forName("org.apache.log4j.jmx.HierarchyDynamicMBean").getConstructor().newInstance();
     
    -                ObjectName mbo = new ObjectName("log4j:hiearchy=default");
    +                String mbean = System.getenv("zookeeper.jmx.log4j.mbean");
    --- End diff --
    
    As far as I know in ZK it is common to use System Properties and not 
environment variables.
    
    I think that the launcher for the server process is setting as system 
property every configuration parameter.
    
    Do you have any example of usages of getEnv in ZooKeeper ?


---

Reply via email to