ZeroConf - Zero Configuration

Chainsaw has ZeroConf elements embedded within it, but you'll need to add a few things to your application to enable your application for ZeroConf.


  1. log4j ZeroConf extension
  2. JmDNS
  3. Add the log4j-zeroconf.jar and the jmdns.jar from these bundles and add them to your application's classpath.
  4. Modify your log4j configuration so that it use the ZeroConfSocketHubAppender.

Here is a complete log4j.xml file that you can use as a base:

<log4j:configuration debug="false" threshold="debug"  xmlns:log4j="">
    <appender name="zeroconf" class="">
        <param name="Name" value="MyZeroConfSockeHubAppender" />
    <!--ROOT Logger-->
        <level value="INFO" />
        <appender-ref ref="zeroconf" />

Once configured and your applicatiion started, you should be able to click on the Zeroconf tab inside Chainsaw, and see the "MyZeroConfSocketHubAppender" listed. If you double click on the row, Chainsaw will automatically connect to your application and start receiving events. You can tick the 'auto-connect' option to have Chainsaw immediately connect as soon as it sees your application started. Great for Dev/QA environment.

The Zeroconf-enabled SocketHubAppender broadcasts it's existence via a multicast protocol, passing enough information for Chainsaw to be able to connect to it.


Multicast protocols generally don't pass through firewall, so in a production environment Zeroconf won't work.