tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1389023 - /tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
Date Sun, 23 Sep 2012 12:56:03 GMT
2012/9/23  <markt@apache.org>:
> Author: markt
> Date: Sun Sep 23 11:37:48 2012
> New Revision: 1389023
>
> URL: http://svn.apache.org/viewvc?rev=1389023&view=rev
> Log:
> Review from rjung
>
> 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=1389023&r1=1389022&r2=1389023&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Sun Sep 23 11:37:48
2012
> @@ -948,7 +948,7 @@ public class AccessLogValve extends Valv
>          log(result);
>
>          // TODO - Make this configurable
> -        if (result.length() < 256) {
> +        if (result.length() <= maxLogMessageBufferSize) {
>              result.clear();
>              charBuffers.add(result);
>          }
> @@ -1825,11 +1825,7 @@ public class AccessLogValve extends Valv
>                  // second
>                  buf.append(Long.toString(time / 1000));
>                  buf.append('.');
> -                int remains = (int) (time % 1000);
> -                buf.append(Long.toString(remains / 100));
> -                remains = remains % 100;
> -                buf.append(Long.toString(remains / 10));
> -                buf.append(Long.toString(remains % 10));
> +                buf.append(Long.toString(time % 1000));

The above change is plainly wrong. It loses leading zeros in the
fractional part.
E.g. it'll print 1060 msec as "1.60" sec (1600).

>              }
>          }
>      }
>

Best regards,
Konstantin Kolinko

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


Mime
View raw message