You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2011/07/21 12:52:47 UTC

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

Author: kkolinko
Date: Thu Jul 21 10:52:46 2011
New Revision: 1149104

URL: http://svn.apache.org/viewvc?rev=1149104&view=rev
Log:
Trivial improvements to access log valve docs. Fix typos noted by André Warnier.

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

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=1149104&r1=1149103&r2=1149104&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Thu Jul 21 10:52:46 2011
@@ -59,7 +59,8 @@ import org.apache.tomcat.util.buf.B2CCon
  * <p>Implementation of the <b>Valve</b> interface that generates a web server
  * access log with the detailed line contents matching a configurable pattern.
  * The syntax of the available patterns is similar to that supported by the
- * Apache <code>mod_log_config</code> module.  As an additional feature,
+ * <a href="http://httpd.apache.org/">Apache HTTP Server</a>
+ * <code>mod_log_config</code> module.  As an additional feature,
  * automatic rollover of log files when the date changes is also supported.</p>
  *
  * <p>Patterns for the logged message may include constant text or any of the
@@ -101,7 +102,9 @@ import org.apache.tomcat.util.buf.B2CCon
  * <p>
  * There is also support to write information from the cookie, incoming
  * header, the Session or something else in the ServletRequest.<br>
- * It is modeled after the apache syntax:
+ * It is modeled after the
+ * <a href="http://httpd.apache.org/">Apache HTTP Server</a> log configuration
+ * syntax:
  * <ul>
  * <li><code>%{xxx}i</code> for incoming headers
  * <li><code>%{xxx}o</code> for outgoing response headers
@@ -112,10 +115,34 @@ import org.apache.tomcat.util.buf.B2CCon
  * </p>
  *
  * <p>
+ * Log rotation can be on or off. This is dictated by the rotatable
+ * property.
+ * </p>
+ *
+ * <p>
+ * For UvNIX users, another field called <code>checkExists</code> is also
+ * available. If set to true, the log file's existence will be checked before
+ * each logging. This way an external log rotator can move the file
+ * somewhere and tomcat will start with a new file.
+ * </p>
+ *
+ * <p>
+ * For JMX junkies, a public method called </code>rotate</code> has
+ * been made available to allow you to tell this instance to move
+ * the existing log file to somewhere else and start writing a new log file.
+ * </p>
+ * 
+ * <p>
  * Conditional logging is also supported. This can be done with the
  * <code>condition</code> property.
  * If the value returned from ServletRequest.getAttribute(condition)
- * yields a non-null value. The logging will be skipped.
+ * yields a non-null value, the logging will be skipped.
+ * </p>
+ * 
+ * <p>
+ * For extended attributes coming from a getAttribute() call,
+ * it is you responsibility to ensure there are no newline or
+ * control characters.
  * </p>
  *
  * @author Craig R. McClanahan

Modified: tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java?rev=1149104&r1=1149103&r2=1149104&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java Thu Jul 21 10:52:46 2011
@@ -74,14 +74,14 @@ import org.apache.tomcat.util.ExceptionU
  *                             certain POST parameters.
  * </li>
  * <li>For any of the x-H(...) the following method will be called from the
- *                HttpServletRequestObject </li>
+ *                HttpServletRequest object </li>
  * <li><code>x-H(authType)</code>: getAuthType </li>
  * <li><code>x-H(characterEncoding)</code>: getCharacterEncoding </li>
  * <li><code>x-H(contentLength)</code>: getContentLength </li>
  * <li><code>x-H(locale)</code>:  getLocale</li>
  * <li><code>x-H(protocol)</code>: getProtocol </li>
  * <li><code>x-H(remoteUser)</code>:  getRemoteUser</li>
- * <li><code>x-H(requestedSessionId)</code>: getGequestedSessionId</li>
+ * <li><code>x-H(requestedSessionId)</code>: getRequestedSessionId</li>
  * <li><code>x-H(requestedSessionIdFromCookie)</code>:
  *                  isRequestedSessionIdFromCookie </li>
  * <li><code>x-H(requestedSessionIdValid)</code>:
@@ -98,7 +98,7 @@ import org.apache.tomcat.util.ExceptionU
  * </p>
  *
  * <p>
- * For UvNIX users, another field called <code>checkExists</code>is also
+ * For UvNIX users, another field called <code>checkExists</code> is also
  * available. If set to true, the log file's existence will be checked before
  * each logging. This way an external log rotator can move the file
  * somewhere and tomcat will start with a new file.
@@ -107,14 +107,14 @@ import org.apache.tomcat.util.ExceptionU
  * <p>
  * For JMX junkies, a public method called </code>rotate</code> has
  * been made available to allow you to tell this instance to move
- * the existing log file to somewhere else start writing a new log file.
+ * the existing log file to somewhere else and start writing a new log file.
  * </p>
  *
  * <p>
  * Conditional logging is also supported. This can be done with the
  * <code>condition</code> property.
  * If the value returned from ServletRequest.getAttribute(condition)
- * yields a non-null value. The logging will be skipped.
+ * yields a non-null value, the logging will be skipped.
  * </p>
  *
  * <p>

Modified: tomcat/trunk/webapps/docs/config/valve.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/valve.xml?rev=1149104&r1=1149103&r2=1149104&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/valve.xml (original)
+++ tomcat/trunk/webapps/docs/config/valve.xml Thu Jul 21 10:52:46 2011
@@ -133,12 +133,11 @@
 
       <attribute name="prefix" required="false">
         <p>The prefix added to the start of each log file's name.  If not
-        specified, the default value is "access_log.".  To specify no prefix,
-        use a zero-length string.</p>
+        specified, the default value is "access_log.".</p>
       </attribute>
 
       <attribute name="requestAttributesEnabled" required="false">
-        <p>Set to <code>true</code> to check for the existance of request
+        <p>Set to <code>true</code> to check for the existence of request
         attributes (typically set by the RemoteIpValve and similar) that should
         be used to override the values returned by the request for remote
         address, remote host, server port and protocol. If the attributes are
@@ -154,8 +153,8 @@
 
       <attribute name="suffix" required="false">
         <p>The suffix added to the end of each log file's name.  If not
-        specified, the default value is "".  To specify no suffix,
-        use a zero-length string.</p>
+        specified, the default value is "" (a zero-length string),
+        meaning that no suffix will be added.</p>
       </attribute>
 
       <attribute name="rotatable" required="false">
@@ -230,7 +229,9 @@
     There is also support to write information incoming or outgoing
     headers, cookies, session or request attributes and special
     timestamp formats.
-    It is modeled after the apache syntax:
+    It is modeled after the
+    <a href="http://httpd.apache.org/">Apache HTTP Server</a> log configuration
+    syntax:
     <ul>
     <li><b><code>%{xxx}i</code></b> for incoming headers</li>
     <li><b><code>%{xxx}o</code></b> for outgoing response headers</li>
@@ -324,12 +325,11 @@
 
       <attribute name="prefix" required="false">
         <p>The prefix added to the start of each log file's name.  If not
-        specified, the default value is "access_log.".  To specify no prefix,
-        use a zero-length string.</p>
+        specified, the default value is "access_log.".</p>
       </attribute>
 
       <attribute name="requestAttributesEnabled" required="false">
-        <p>Set to <code>true</code> to check for the existance of request
+        <p>Set to <code>true</code> to check for the existence of request
         attributes (typically set by the RemoteIpValve and similar) that should
         be used to override the values returned by the request for remote
         address, remote host, server port and protocol. If the attributes are
@@ -345,8 +345,8 @@
 
       <attribute name="suffix" required="false">
         <p>The suffix added to the end of each log file's name.  If not
-        specified, the default value is "".  To specify no suffix,
-        use a zero-length string.</p>
+        specified, the default value is "" (a zero-length string),
+        meaning that no suffix will be added.</p>
       </attribute>
 
       <attribute name="rotatable" required="false">
@@ -414,7 +414,7 @@
     </ul>
 
     <p>For any of the <code>x-H(XXX)</code> the following method will be called from the
-    HttpServletRequestObject:</p>
+    HttpServletRequest object:</p>
     <ul>
     <li><b><code>x-H(authType)</code></b>: getAuthType </li>
     <li><b><code>x-H(characterEncoding)</code></b>: getCharacterEncoding </li>
@@ -422,7 +422,7 @@
     <li><b><code>x-H(locale)</code></b>:  getLocale</li>
     <li><b><code>x-H(protocol)</code></b>: getProtocol </li>
     <li><b><code>x-H(remoteUser)</code></b>:  getRemoteUser</li>
-    <li><b><code>x-H(requestedSessionId)</code></b>: getGequestedSessionId</li>
+    <li><b><code>x-H(requestedSessionId)</code></b>: getRequestedSessionId</li>
     <li><b><code>x-H(requestedSessionIdFromCookie)</code></b>:
                      isRequestedSessionIdFromCookie </li>
     <li><b><code>x-H(requestedSessionIdValid)</code></b>:



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


Re: svn commit: r1149104 - in /tomcat/trunk: java/org/apache/catalina/valves/AccessLogValve.java java/org/apache/catalina/valves/ExtendedAccessLogValve.java webapps/docs/config/valve.xml

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/7/21 Felix Schumacher <fe...@internetallee.de>:
> Hi Konstantin,
>
> while correcting typos. I think UvNIX is a typo also. It is present in
> AccessLogValve and ExtendedLogValve only.

I guess it is something between Unix and Linux, as usual.

Googling for this word - indeed it is used only here. I didn't expect
that so many sites have a copy of our documentation, :/


>
> Regards
>  Felix
>
> Am Donnerstag, den 21.07.2011, 10:52 +0000 schrieb kkolinko@apache.org:
>> Author: kkolinko
>> Date: Thu Jul 21 10:52:46 2011
>> New Revision: 1149104
>>
>> URL: http://svn.apache.org/viewvc?rev=1149104&view=rev
>> Log:
> ... *
>> + * <p>
>> + * For UvNIX users, another field called <code>checkExists</code> is also
>> + * available. If set to true, the log file's existence will be checked before
>> +
> ...

Best regards,
Konstantin Kolinko

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


Re: svn commit: r1149104 - in /tomcat/trunk: java/org/apache/catalina/valves/AccessLogValve.java java/org/apache/catalina/valves/ExtendedAccessLogValve.java webapps/docs/config/valve.xml

Posted by Felix Schumacher <fe...@internetallee.de>.
Hi Konstantin,

while correcting typos. I think UvNIX is a typo also. It is present in
AccessLogValve and ExtendedLogValve only.

Regards
 Felix

Am Donnerstag, den 21.07.2011, 10:52 +0000 schrieb kkolinko@apache.org:
> Author: kkolinko
> Date: Thu Jul 21 10:52:46 2011
> New Revision: 1149104
> 
> URL: http://svn.apache.org/viewvc?rev=1149104&view=rev
> Log:
... *
> + * <p>
> + * For UvNIX users, another field called <code>checkExists</code> is also
> + * available. If set to true, the log file's existence will be checked before
> +
...
>   * <p>
> - * For UvNIX users, another field called <code>checkExists</code>is also
> + * For UvNIX users, another field called <code>checkExists</code> is also
>   * available. If set to true, the log file's existence will be checked before



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