You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2012/12/05 11:56:18 UTC

svn commit: r1417352 - in /tomcat/trunk: conf/server.xml java/org/apache/catalina/valves/AccessLogValve.java webapps/docs/config/valve.xml

Author: rjung
Date: Wed Dec  5 10:56:17 2012
New Revision: 1417352

URL: http://svn.apache.org/viewvc?rev=1417352&view=rev
Log:
Move trailing dot in default ALV prefix
to leading dot in fileDateFormat.

This gives better behavior over a broader range
of config combinations.

Modified:
    tomcat/trunk/conf/server.xml
    tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
    tomcat/trunk/webapps/docs/config/valve.xml

Modified: tomcat/trunk/conf/server.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/conf/server.xml?rev=1417352&r1=1417351&r2=1417352&view=diff
==============================================================================
--- tomcat/trunk/conf/server.xml (original)
+++ tomcat/trunk/conf/server.xml Wed Dec  5 10:56:17 2012
@@ -133,7 +133,7 @@
              Documentation at: /docs/config/valve.html
              Note: The pattern used is equivalent to using pattern="common" -->
         <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
-               prefix="localhost_access_log." suffix=".txt"
+               prefix="localhost_access_log" suffix=".txt"
                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
 
       </Host>

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=1417352&r1=1417351&r2=1417352&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Wed Dec  5 10:56:17 2012
@@ -200,7 +200,7 @@ public class AccessLogValve extends Valv
     /**
      * The prefix that is added to log file filenames.
      */
-    protected String prefix = "access_log.";
+    protected String prefix = "access_log";
 
 
     /**
@@ -1233,7 +1233,7 @@ public class AccessLogValve extends Valv
         // Initialize the Date formatters
         String format = getFileDateFormat();
         if (format == null || format.length() == 0) {
-            format = "yyyy-MM-dd";
+            format = ".yyyy-MM-dd";
             setFileDateFormat(format);
         }
         fileDateFormatter = new SimpleDateFormat(format, Locale.US);

Modified: tomcat/trunk/webapps/docs/config/valve.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/valve.xml?rev=1417352&r1=1417351&r2=1417352&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/valve.xml (original)
+++ tomcat/trunk/webapps/docs/config/valve.xml Wed Dec  5 10:56:17 2012
@@ -226,8 +226,8 @@
         <p>Allows a customized date format in the access log file name.
            The date format also decides how often the file is rotated.
            If you wish to rotate every hour, then set this value
-           to: <code>yyyy-MM-dd.HH</code>. The default value is
-           <code>yyyy-MM-dd</code>. The date format will always be localized
+           to: <code>.yyyy-MM-dd.HH</code>. The default value is
+           <code>.yyyy-MM-dd</code>. The date format will always be localized
            using the locale <code>en_US</code>.
         </p>
       </attribute>



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