Details
Description
Hi,
I wanted to change the logging level of zookeeper dynamically via a JMX call programmatically. Apache Zookeeper official page specifies that it is possible to change the Mbeans via JMX calls and I have verified this through JConsole also.
But the problem is that I am not able to update the Mbeans related to log4j through my code. I do see an API which can be used to access the Mbeans related to Object "org.apache.ZooKeeperService:name0=StandaloneServer_port-1" below is the screengrab of Jconsole and my code:
Here goes my Code:
public static void main(String[] args) throws Exception
Unknown macro: { JMXServiceURL url = new JMXServiceURL("service}
I dont see any API which can be used to access and update the log4J Mbeans e.g. "root". What I want to achieve is to update the logging of zookeeper without taking a restart.
Please advice if some API is exposed to achieve this.