Lines 46-51
Link Here
|
46 |
import org.apache.catalina.LifecycleState; |
46 |
import org.apache.catalina.LifecycleState; |
47 |
import org.apache.catalina.connector.Request; |
47 |
import org.apache.catalina.connector.Request; |
48 |
import org.apache.catalina.connector.Response; |
48 |
import org.apache.catalina.connector.Response; |
|
|
49 |
import org.apache.catalina.util.ServerInfo; |
49 |
import org.apache.coyote.RequestInfo; |
50 |
import org.apache.coyote.RequestInfo; |
50 |
import org.apache.juli.logging.Log; |
51 |
import org.apache.juli.logging.Log; |
51 |
import org.apache.juli.logging.LogFactory; |
52 |
import org.apache.juli.logging.LogFactory; |
Lines 159-164
Link Here
|
159 |
public class AccessLogValve extends ValveBase implements AccessLog { |
160 |
public class AccessLogValve extends ValveBase implements AccessLog { |
160 |
|
161 |
|
161 |
private static final Log log = LogFactory.getLog(AccessLogValve.class); |
162 |
private static final Log log = LogFactory.getLog(AccessLogValve.class); |
|
|
163 |
protected Log outputLog = null; |
162 |
|
164 |
|
163 |
//------------------------------------------------------ Constructor |
165 |
//------------------------------------------------------ Constructor |
164 |
public AccessLogValve() { |
166 |
public AccessLogValve() { |
Lines 1015-1020
Link Here
|
1015 |
* @param message Message to be logged |
1017 |
* @param message Message to be logged |
1016 |
*/ |
1018 |
*/ |
1017 |
public void log(String message) { |
1019 |
public void log(String message) { |
|
|
1020 |
if (outputLog != null) |
1021 |
outputLog.info(message); |
1022 |
else |
1023 |
logInternal(message); |
1024 |
} |
1025 |
protected void logInternal(String message) { |
1018 |
if (rotatable) { |
1026 |
if (rotatable) { |
1019 |
// Only do a logfile switch check once a second, max. |
1027 |
// Only do a logfile switch check once a second, max. |
1020 |
long systime = System.currentTimeMillis(); |
1028 |
long systime = System.currentTimeMillis(); |
Lines 1069-1074
Link Here
|
1069 |
} |
1077 |
} |
1070 |
|
1078 |
|
1071 |
} |
1079 |
} |
|
|
1080 |
public void setOutputLoggerName(String loggerName) { |
1081 |
outputLog = LogFactory.getLog(loggerName); |
1082 |
outputLog.info("#Fields: " + pattern); |
1083 |
outputLog.info("#Version: 2.0"); |
1084 |
outputLog.info("#Software: " + ServerInfo.getServerInfo()); |
1085 |
|
1086 |
} |
1072 |
|
1087 |
|
1073 |
|
1088 |
|
1074 |
/** |
1089 |
/** |