Author: kkolinko Date: Sun Apr 27 23:19:59 2014 New Revision: 1590521 URL: http://svn.apache.org/r1590521 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55215 Merged r1518536 from tomcat/trunk: Additional clarifications to logging documentation that make clear why access logs are handled separately. Patch provided by Brian Burch.
Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml tomcat/tc7.0.x/trunk/webapps/docs/config/valve.xml tomcat/tc7.0.x/trunk/webapps/docs/logging.xml Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1518536 Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1590521&r1=1590520&r2=1590521&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sun Apr 27 23:19:59 2014 @@ -255,6 +255,10 @@ Apache Commons Daemon documentation. (kkolinko) </fix> <update> + <bug>55215</bug>: Clarify access logging documentation. Based on patch + provided by Brian Burch. (kkolinko) + </update> + <update> <bug>55383</bug>: Backport improved HTML markup for tables and code fragments from Tomcat 8 documentation. (kkolinko) </update> Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/valve.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/valve.xml?rev=1590521&r1=1590520&r2=1590521&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/config/valve.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/config/valve.xml Sun Apr 27 23:19:59 2014 @@ -55,13 +55,19 @@ <subsection name="Introduction"> - <p>The <strong>Access Log Valve</strong> creates log files in the same - format as those created by standard web servers. These logs can later - be analyzed by standard log analysis tools to track page hit counts, - user session activity, and so on. The files produces by this <code>Valve</code> - are rolled over nightly at midnight. This <code>Valve</code> - may be associated with any Catalina container (<code>Context</code>, - <code>Host</code>, or <code>Engine</code>), and + <p>The <strong>Access Log Valve</strong> creates log files in the + same format as those created by standard web servers. These logs + can later be analyzed by standard log analysis tools to track page + hit counts, user session activity, and so on. This <code>Valve</code> + uses self-contained logic to write its log files, which can be + automatically rolled over at midnight each day. (The essential + requirement for access logging is to handle a large continuous + stream of data with low overhead. This <code>Valve</code> does not + use Apache Commons Logging, thus avoiding additional overhead and + potentially complex configuration).</p> + + <p>This <code>Valve</code> may be associated with any Catalina container + (<code>Context</code>, <code>Host</code>, or <code>Engine</code>), and will record ALL requests processed by that container.</p> <p>Some requests may be handled by Tomcat before they are passed to a @@ -330,12 +336,15 @@ <subsection name="Introduction"> - <p>The <strong>Extended Access Log Valve</strong> is a variant of - the Access Log Valve. It is not a real extension of the standard - Access Log valve, instead it supports the so-called + <p>The <strong>Extended Access Log Valve</strong> extends the + <a href="#Access_Log_Valve">Access Log Valve</a> class, and so + uses the same self-contained logging logic. This means it + implements many of the same file handling attributes. The main + difference to the standard <code>AccessLogValve</code> is that + <code>ExtendedAccessLogValve</code> creates log files which + conform to the the Working Draft for the <a href="http://www.w3.org/TR/WD-logfile.html">Extended Log File Format</a> - defined by the W3C. The main difference to the standard - <code>AccessLogValve</code> are the supported pattern values.</p> + defined by the W3C.</p> </subsection> Modified: tomcat/tc7.0.x/trunk/webapps/docs/logging.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/logging.xml?rev=1590521&r1=1590520&r2=1590521&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/logging.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/logging.xml Sun Apr 27 23:19:59 2014 @@ -57,7 +57,7 @@ logging, one has to replace the logging library with the one that is built with the full implementation. Such library is provided as an <a href="extras.html">extras</a> component. Instructions on how to configure Tomcat to use Log4j framework - for its internal logging may be found below. + for its internal logging may be found <a href="#Using_Log4j">below</a>. </p> <p> @@ -193,9 +193,16 @@ <subsection name="Access logging"> <p> - A related, but different feature is access logging. It can be configured - as a valve at the Context, or Host, or Engine. See <a href="config/valve.html">Valves</a> - documentation for more details. + Access logging is a related but different feature, which is + implemented as a <code>Valve</code>. It uses self-contained + logic to write its log files. The essential requirement for + access logging is to handle a large continuous stream of data + with low overhead, so it only uses Apache Commons Logging for + its own debug messages. This implementation approach avoids + additional overhead and potentially complex configuration. + Please refer to the <a href="config/valve.html">Valves</a> + documentation for more details on its configuration, including + the various report formats. </p> </subsection> @@ -563,15 +570,26 @@ log4j.logger.org.apache.catalina.session library are likely to automatically choose log4j as the underlying logging implementation.</p></li> - <li><p>The <code>java.util.logging</code> API is still available, for - those web applications that use it directly. The + <li><p>The <code>java.util.logging</code> API is still available for + those web applications that use it directly. The <code>${catalina.base}/conf/logging.properties</code> file is still - referenced by Tomcat startup scripts.</p> + referenced by Tomcat startup scripts. For more information, see the + subsections of the <a href="#Introduction">Introduction</a> to + this page.</p> <p> Removal of <code>${catalina.base}/conf/logging.properties</code> - file, mentioned as one of the steps, just causes - <code>java.util.logging</code> to fallback to the default configuration - as configured in JRE, which is to use a ConsoleHandler and do not - create any files.</p></li> + file, mentioned as one of the steps above, causes + <code>java.util.logging</code> to fallback to the default + configuration for the JRE, which is to use a ConsoleHandler + and therefore not create any standard log files. You should + confirm that all your log files are being created by log4j + <i>before</i> disabling the standard mechanism.</p></li> + + <li><p>The <strong>Access Log Valve</strong> and + <strong>ExtendedAccessLogValve</strong> use their own self-contained + logging implementation, so they + <strong><i>cannot be configured to use log4j</i></strong>. + Refer to <a href="config/valve.html#Access_Log_Valve">Valves</a> + for specific configuration details.</p></li> </ul> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org