tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1241087 - /tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
Date Mon, 06 Feb 2012 17:30:37 GMT
Author: rjung
Date: Mon Feb  6 17:30:37 2012
New Revision: 1241087

URL: http://svn.apache.org/viewvc?rev=1241087&view=rev
Log:
Fix millisecond handling in AccessLogValve when
used with a general SimpleDateFormat time pattern.

We called tidyFormat() but never used the tidied
format.

Modified:
    tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1241087&r1=1241086&r2=1241087&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Mon Feb  6 17:30:37 2012
@@ -1431,7 +1431,7 @@ public class AccessLogValve extends Valv
          * chars later with the actual milliseconds because that's
          * relatively cheap.
          */
-        private void tidyFormat() {
+        private String tidyFormat(String format) {
             boolean escape = false;
             StringBuilder result = new StringBuilder();
             int len = format.length();
@@ -1448,6 +1448,7 @@ public class AccessLogValve extends Valv
                     escape = !escape;
                 }
             }
+            return result.toString();
         }
 
         protected DateAndTimeElement(String header) {
@@ -1476,7 +1477,7 @@ public class AccessLogValve extends Valv
                     type = formatType.MSEC_FRAC;
                 } else {
                     type = formatType.SDF;
-                    tidyFormat();
+                    format = tidyFormat(format);
                 }
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message