FileDocCategorySizeDatePackage
Agent.javaAPI DocApache log4j 1.2.151770Sat Aug 25 00:09:40 BST 2007org.apache.log4j.jmx

Agent

public class Agent extends Object

Fields Summary
static Logger
log
Constructors Summary
public Agent()


    
  
Methods Summary
public voidstart()


    MBeanServer server = MBeanServerFactory.createMBeanServer();
    HtmlAdaptorServer html = new HtmlAdaptorServer();

    try {
      log.info("Registering HtmlAdaptorServer instance.");
      server.registerMBean(html, new ObjectName("Adaptor:name=html,port=8082"));
      log.info("Registering HierarchyDynamicMBean instance.");
      HierarchyDynamicMBean hdm = new HierarchyDynamicMBean();
      server.registerMBean(hdm, new ObjectName("log4j:hiearchy=default"));

    } catch(Exception e) {
      log.error("Problem while regitering MBeans instances.", e);
      return;
    }
    html.start();