ASF Bugzilla – Attachment 28344 Details for
Bug 52688
Add ability to remove old access log files [PATCHES]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Diff of AccessLogValve patch
AccessLogValve.diff (text/plain), 1.45 KB, created by
Mark
on 2012-02-16 21:40:18 UTC
(
hide
)
Description:
Diff of AccessLogValve patch
Filename:
MIME Type:
Creator:
Mark
Created:
2012-02-16 21:40:18 UTC
Size:
1.45 KB
patch
obsolete
>--- 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()); >+ >+ } > > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 52688
:
28344
|
28345
|
28515
|
28516
|
28517