You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fu...@apache.org on 2003/07/18 03:24:45 UTC

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves ExtendedAccessLogValve.java

funkman     2003/07/17 18:24:45

  Modified:    catalina/src/share/org/apache/catalina/valves
                        ExtendedAccessLogValve.java
  Log:
  Port from 5: If bytes are requested, then print bytes not the date.
  
  Revision  Changes    Path
  1.2       +11 -7     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ExtendedAccessLogValve.java
  
  Index: ExtendedAccessLogValve.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ExtendedAccessLogValve.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ExtendedAccessLogValve.java	8 Jul 2003 23:12:51 -0000	1.1
  +++ ExtendedAccessLogValve.java	18 Jul 2003 01:24:45 -0000	1.2
  @@ -637,9 +637,13 @@
                           result.append(timeTakenFormatter.format(runTime/1000d));
                       else if (FieldInfo.SPECIAL_TIME==fieldInfos[i].location)
                           result.append(timeFormatter.format(date));
  -                    else if (FieldInfo.SPECIAL_BYTES==fieldInfos[i].location)
  -                        result.append(dateFormatter.format(date));
  -                    else if (FieldInfo.SPECIAL_CACHED==fieldInfos[i].location)
  +                    else if (FieldInfo.SPECIAL_BYTES==fieldInfos[i].location) {
  +                        int length = response.getContentCount();
  +                        if (length > 0)
  +                            result.append(length);
  +                        else
  +                            result.append("-");
  +                    } else if (FieldInfo.SPECIAL_CACHED==fieldInfos[i].location)
                           result.append('-'); /* I don't know how to evaluate this! */
                       else
                           result.append("?WTF?"); /* This should never happen! */
  
  
  

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