How to Use Chainsaw

1) Create the ChainsawSample.java file:

import org.apache.log4j.Logger;

public final class ChainsawSample {

  public static void main(final String[] args) {
    final Logger logger = Logger.getLogger(ChainsawSample.class);

    logger.info("Hello World!");
  }

}

2) Create the log4j.properties file:

log4j.appender.A1=org.apache.log4j.net.SocketAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.RemoteHost=localhost # use the default port

log4j.logger.ChainsawSample=INFO, A1

3) Compile the ChainsawSample.java file.

4) Launch Chainsaw.

5) Launch the ChainsawSample class.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s