--- AccessLogValve.java Thu Feb 16 16:29:00 2012 +++ AccessLogValve.java.new Thu Feb 16 16:31:44 2012 @@ -46,6 +46,7 @@ import org.apache.catalina.LifecycleState; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; +import org.apache.catalina.util.ServerInfo; import org.apache.coyote.RequestInfo; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -159,6 +160,7 @@ public class AccessLogValve extends ValveBase implements AccessLog { private static final Log log = LogFactory.getLog(AccessLogValve.class); + protected Log outputLog = null; //------------------------------------------------------ Constructor public AccessLogValve() { @@ -1015,6 +1017,12 @@ * @param message Message to be logged */ public void log(String message) { + if (outputLog != null) + outputLog.info(message); + else + logInternal(message); + } + protected void logInternal(String message) { if (rotatable) { // Only do a logfile switch check once a second, max. long systime = System.currentTimeMillis(); @@ -1069,6 +1077,13 @@ } } + public void setOutputLoggerName(String loggerName) { + outputLog = LogFactory.getLog(loggerName); + outputLog.info("#Fields: " + pattern); + outputLog.info("#Version: 2.0"); + outputLog.info("#Software: " + ServerInfo.getServerInfo()); + + } /**