Some times you will have to debug the proxy to find out what is going on. To help you with this J2EP has a good amount of log generation built in.
J2EP uses jakarta commons-logging for it's logging. This means it's easy to use any logging engine that you want. log4j and java.util.logging are the probable candidates. This documentation will only cover the setup used to get java.util.logging running using Tomcat 5.5.
Since J2EP uses httpclient to do the connection to the servers it's a good idea to read the information about logging with httpclient. That information can be found in their manual. Httpclient is using commons-logging too so the configuration will be the same for httpclient and J2EP.
Tomcat has included it's own implementation of java.util.logging called JULI. This makes it easy to add a simple logging without installing a new framework like log4j. You can read more about the logging for tomcat in it's documentation.
Make your own logging.properties file and place it in J2EP_INSTALL_DIR/WEB-INF/classes. This file can include all the documentation needed to configure various logging levels for the packages.
The following configuration will write the log to TOMCAT_ROOT/logs/ with the prefix j2ep. It is configured to debug the base level and the server package which is a good config to debug the creation of rules and watch rewriting.
handlers = org.apache.juli.FileHandler ############################################################ # Handler specific properties. # Describes specific configuration info for Handlers. ############################################################ org.apache.juli.FileHandler.level = FINEST org.apache.juli.FileHandler.directory = /logs org.apache.juli.FileHandler.prefix = j2ep. .level=INFO httpclient.wire.header.level=INFO org.apache.commons.httpclient.level=INFO net.sf.j2ep.level=FINE net.sf.j2ep.servers.level=FINE
The following configuration will also write the log to TOMCAT_ROOT/logs/ with the prefix j2ep. This config is only using the httpclient to do a debug of the headers. It will write all the headers sent and received and can be good when you want to debug a connection.
handlers = org.apache.juli.FileHandler ############################################################ # Handler specific properties. # Describes specific configuration info for Handlers. ############################################################ org.apache.juli.FileHandler.level = FINEST org.apache.juli.FileHandler.directory = /logs org.apache.juli.FileHandler.prefix = j2ep. .level=INFO httpclient.wire.header.level=FINE org.apache.commons.httpclient.level=FINE