Author: markt
Date: Tue Jul 5 13:24:48 2016
New Revision: 1751465
URL: http://svn.apache.org/viewvc?rev=1751465&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58588
Remove the JULI extras package from the distribution.
It was only useful for switching Tomcat's internal logging to log4j 1.2.x and
that version of log4j is no longer supported. No additional Tomcat code is
required if switching Tomcat's internal logging to log via log4j 2.x.
Modified:
tomcat/tc8.5.x/trunk/ (props changed)
tomcat/tc8.5.x/trunk/build.xml
tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml
tomcat/tc8.5.x/trunk/webapps/docs/logging.xml
Propchange: tomcat/tc8.5.x/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 5 13:24:48 2016
@@ -1 +1 @@
-/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737903,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409,1741501
,1741677,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427,1746441,1746473,1746490,1746492,1746495-1746496,1746499-1746501,1746503-1746507,1746509,1746549,1746551,1746554,1746556,1746558,1746584,1746620,1746649,1746724,1746939,1746989,1747014,1747028,1747035,1747210,1747225,1747234,1747253,1747404,1747506,1747536,1747924,1747980,1747
993,1748001,1748253,1748452,1748547,1748629,1748676,1748715,1749287,1749296,1749328,1749373,1749465,1749506,1749508,1749665-1749666,1749763,1749865-1749866,1749898,1749978,1749980,1750011,1750015,1750056,1750480,1750617,1750634,1750692,1750697,1750700,1750703,1750707,1750714,1750718,1750723,1750899,1750975,1750995,1751061,1751097
+/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737903,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409,1741501
,1741677,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745473,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427,1746441,1746473,1746490,1746492,1746495-1746496,1746499-1746501,1746503-1746507,1746509,1746549,1746551,1746554,1746556,1746558,1746584,1746620,1746649,1746724,1746939,1746989,1747014,1747028,1747035,1747210,1747225,1747234,1747253,1747404,1747506,1747536,1747924,1747
980,1747993,1748001,1748253,1748452,1748547,1748629,1748676,1748715,1749287,1749296,1749328,1749373,1749465,1749506,1749508,1749665-1749666,1749763,1749865-1749866,1749898,1749978,1749980,1750011,1750015,1750056,1750480,1750617,1750634,1750692,1750697,1750700,1750703,1750707,1750714,1750718,1750723,1750899,1750975,1750995,1751061,1751097
Modified: tomcat/tc8.5.x/trunk/build.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/build.xml?rev=1751465&r1=1751464&r2=1751465&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/build.xml (original)
+++ tomcat/tc8.5.x/trunk/build.xml Tue Jul 5 13:24:48 2016
@@ -143,22 +143,16 @@
<property name="tomcat-embed-jasper.jar"
value="${tomcat.embed}/tomcat-embed-jasper.jar"/>
<property name="tomcat-embed-el.jar"
value="${tomcat.embed}/tomcat-embed-el.jar"/>
<property name="tomcat-embed-websocket.jar"
value="${tomcat.embed}/tomcat-embed-websocket.jar"/>
- <property name="tomcat-embed-juli.jar"
value="${tomcat.embed}/tomcat-embed-logging-juli.jar"/>
<property name="tomcat-embed-core-sources.jar"
value="${tomcat.embed.sources}/tomcat-embed-core-src.jar"/>
<property name="tomcat-embed-jasper-sources.jar"
value="${tomcat.embed.sources}/tomcat-embed-jasper-src.jar"/>
<property name="tomcat-embed-el-sources.jar"
value="${tomcat.embed.sources}/tomcat-embed-el-src.jar"/>
<property name="tomcat-embed-websocket-sources.jar"
value="${tomcat.embed.sources}/tomcat-embed-websocket-src.jar"/>
- <property name="tomcat-embed-juli-sources.jar"
value="${tomcat.embed.sources}/tomcat-embed-logging-juli-src.jar"/>
<!-- Extras JARs & source JARs -->
- <property name="tomcat-juli-extras.jar"
value="${tomcat.extras}/tomcat-juli.jar"/>
- <property name="tomcat-juli-adapters.jar"
value="${tomcat.extras}/tomcat-juli-adapters.jar"/>
<property name="catalina-ws.jar" value="${tomcat.extras}/catalina-ws.jar"/>
<property name="catalina-jmx-remote.jar"
value="${tomcat.extras}/catalina-jmx-remote.jar"/>
- <property name="tomcat-juli-extras-src.jar"
value="${tomcat.extras.sources}/tomcat-juli-src.jar"/>
- <property name="tomcat-juli-adapters-src.jar"
value="${tomcat.extras.sources}/tomcat-juli-adapters-src.jar"/>
<property name="catalina-ws-src.jar"
value="${tomcat.extras.sources}/catalina-ws-src.jar"/>
<property name="catalina-jmx-remote-src.jar"
value="${tomcat.extras.sources}/catalina-jmx-remote-src.jar"/>
@@ -489,15 +483,6 @@
<include name="org/apache/catalina/mbeans/JmxRemote*" />
</patternset>
- <patternset id="files.tomcat-extras-juli-adapters">
- <include name="org/apache/juli/logging/impl/**" />
- <exclude name="org/apache/juli/logging/impl/WeakHashtable*" />
- <exclude name="org/apache/juli/logging/impl/LogFactoryImpl*" />
- <!-- Javadoc and i18n exclusions -->
- <exclude name="**/package.html" />
- <exclude name="**/LocalStrings_*" />
- </patternset>
-
<!-- =========================== Build targets ===========================
-->
<target name="build-prepare">
@@ -1240,9 +1225,6 @@
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-websocket"
meta-inf="${tomcat.manifests}/tomcat-websocket.jar"/>
- <jarIt jarfile="${tomcat-embed-juli.jar}"
- filesDir="${tomcat.classes}"
- filesId="files.tomcat-juli"/>
</target>
@@ -1266,9 +1248,6 @@
<jarIt jarfile="${tomcat-embed-websocket-sources.jar}"
filesDir="java"
filesId="files.tomcat-embed-websocket"/>
- <jarIt jarfile="${tomcat-embed-juli-sources.jar}"
- filesDir="java"
- filesId="files.tomcat-juli"/>
<copy file="${tomcat-dbcp-src.jar}" todir="${tomcat.embed.sources}" />
@@ -1278,7 +1257,7 @@
<target name="embed"
description="Creates the experimental embedded release"
- depends="embed-jars,embed-sources,embed-extras" >
+ depends="embed-jars,embed-sources" >
<fixcrlf srcdir="${tomcat.embed}" eol="crlf"
encoding="ISO-8859-1" fixlast="false" >
@@ -1595,149 +1574,9 @@
<mkdir dir="${tomcat.extras.sources}"/>
<mkdir dir="${tomcat.embed}"/>
<mkdir dir="${tomcat.embed.sources}"/>
- <mkdir dir="${tomcat.extras}/logging"/>
<mkdir dir="${tomcat.extras}/webservices"/>
</target>
- <target name="extras-commons-logging-prepare"
- depends="extras-prepare"
- description="Prepare to build web services extras package">
-
- <antcall target="downloadfile-2">
- <param name="sourcefile.1" value="${commons-logging-src.loc.1}"/>
- <param name="sourcefile.2" value="${commons-logging-src.loc.2}"/>
- <param name="destfile" value="${commons-logging-src.tar.gz}"/>
- <param name="destdir" value="${commons-logging.home}"/>
- </antcall>
-
- <antcall target="downloadfile">
- <param name="sourcefile" value="${avalon-framework.loc}"/>
- <param name="destfile" value="${avalon-framework.jar}"/>
- <param name="destdir" value="${avalon-framework.home}"/>
- </antcall>
-
- <antcall target="downloadfile">
- <param name="sourcefile" value="${log4j.loc}"/>
- <param name="destfile" value="${log4j.jar}"/>
- <param name="destdir" value="${log4j.home}"/>
- </antcall>
-
- <antcall target="downloadfile">
- <param name="sourcefile" value="${logkit.loc}"/>
- <param name="destfile" value="${logkit.jar}"/>
- <param name="destdir" value="${logkit.home}"/>
- </antcall>
-
- <antcall target="downloadfile">
- <param name="sourcefile" value="${servletapi.loc}"/>
- <param name="destfile" value="${servletapi.jar}"/>
- <param name="destdir" value="${servletapi.home}"/>
- </antcall>
-
- </target>
-
- <target name="extras-commons-logging"
- depends="extras-commons-logging-prepare,compile,build-manifests"
- description="Build JULI for log4j extras package">
-
- <gunzip src="${commons-logging-src.tar.gz}"
- dest="${tomcat.extras}/logging/commons-logging-src.tar"/>
- <untar src="${tomcat.extras}/logging/commons-logging-src.tar"
- dest="${tomcat.extras}/logging/"/>
-
- <replace
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java/org/apache/commons"
- encoding="ISO-8859-1">
- <replacefilter token="org.apache.commons"
- value="org.apache.juli" />
- </replace>
- <mkdir
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java/org/apache/juli"
/>
- <move
todir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java/org/apache/juli">
- <fileset
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java/org/apache/commons"
/>
- </move>
-
- <replace
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src"
- encoding="ISO-8859-1">
- <replacefilter token="org.apache.commons"
- value="org.apache.juli" />
- <replacefilter token="org/apache/commons/"
- value="org/apache/juli/" />
- </replace>
- <copy
tofile="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build2.xml"
-
file="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build.xml"
/>
-
- <copy
todir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src">
- <fileset file="${avalon-framework.jar}" />
- <fileset file="${log4j.jar}" />
- <fileset file="${logkit.jar}" />
- <fileset file="${servletapi.jar}" />
- </copy>
-
- <ant
antfile="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build2.xml"
-
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src"
- inheritAll="false" target="compile" />
-
- <jar jarfile="${tomcat-juli-extras.jar}"
- manifest="${tomcat.manifests}/default.manifest">
- <fileset
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/target/classes">
- <include name="org/apache/juli/logging/*" />
- <include name="org/apache/juli/logging/impl/LogFactoryImpl*.class" />
- <include name="org/apache/juli/logging/impl/WeakHashtable*.class" />
- <include name="org/apache/juli/logging/impl/SimpleLog*.class" />
- <include name="org/apache/juli/logging/impl/NoOpLog*.class" />
- <include name="org/apache/juli/logging/impl/Jdk14Logger.class" />
- <!-- Javadoc and i18n exclusions -->
- <exclude name="**/package.html" />
- <exclude name="**/LocalStrings_*" />
- </fileset>
- <fileset dir="${tomcat.classes}">
- <include name="org/apache/juli/*" />
- <!-- Javadoc and i18n exclusions -->
- <exclude name="**/package.html" />
- <exclude name="**/LocalStrings_*" />
- </fileset>
- <zipfileset file="${tomcat.manifests}/default.notice"
- fullpath="META-INF/NOTICE" />
- <zipfileset file="${tomcat.manifests}/default.license"
- fullpath="META-INF/LICENSE" />
- </jar>
- <hashAndSign file="${tomcat-juli-extras.jar}" />
-
- <jarIt jarfile="${tomcat-juli-adapters.jar}"
-
filesDir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/target/classes"
- filesId="files.tomcat-extras-juli-adapters" />
- <hashAndSign file="${tomcat-juli-adapters.jar}" />
-
- <!-- Source JARs -->
- <jar jarfile="${tomcat-juli-extras-src.jar}"
- manifest="${tomcat.manifests}/default.manifest">
- <fileset
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java">
- <include name="org/apache/juli/logging/*.java" />
- <include name="org/apache/juli/logging/impl/LogFactoryImpl*.java" />
- <include name="org/apache/juli/logging/impl/WeakHashtable*.java" />
- <include name="org/apache/juli/logging/impl/SimpleLog*.java" />
- <include name="org/apache/juli/logging/impl/NoOpLog*.java" />
- <include name="org/apache/juli/logging/impl/Jdk14Logger.java" />
- <!-- Javadoc and i18n exclusions -->
- <exclude name="**/package.html" />
- <exclude name="**/LocalStrings_*" />
- </fileset>
- <fileset dir="java">
- <include name="org/apache/juli/*" />
- <!-- Javadoc and i18n exclusions -->
- <exclude name="**/package.html" />
- <exclude name="**/LocalStrings_*" />
- </fileset>
- <zipfileset file="${tomcat.manifests}/default.notice"
- fullpath="META-INF/NOTICE" />
- <zipfileset file="${tomcat.manifests}/default.license"
- fullpath="META-INF/LICENSE" />
- </jar>
- <jarIt jarfile="${tomcat-juli-adapters-src.jar}"
-
filesDir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java"
- filesId="files.tomcat-extras-juli-adapters" />
-
- </target>
-
<target name="extras-webservices-prepare"
depends="extras-prepare"
description="Prepare to build web services extras package">
@@ -1804,57 +1643,10 @@
</target>
<target name="extras"
- depends="extras-commons-logging,extras-webservices,extras-jmx-remote"
+ depends="extras-webservices,extras-jmx-remote"
description="Build all extras packages">
</target>
- <target name="embed-extras" depends="extras"
- description="Embedded packaging for those extras that can use it">
-
- <jar jarfile="${tomcat-embed-log4j.jar}"
- manifest="${tomcat.manifests}/default.manifest">
- <fileset
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/target/classes">
- <include name="org/apache/juli/logging/*" />
- <include name="org/apache/juli/logging/impl/*" />
- <!-- Javadoc and i18n exclusions -->
- <exclude name="**/package.html" />
- <exclude name="**/LocalStrings_*" />
- </fileset>
- <fileset dir="${tomcat.classes}">
- <include name="org/apache/juli/*" />
- <!-- Javadoc and i18n exclusions -->
- <exclude name="**/package.html" />
- <exclude name="**/LocalStrings_*" />
- </fileset>
- <zipfileset file="${tomcat.manifests}/default.notice"
- fullpath="META-INF/NOTICE" />
- <zipfileset file="${tomcat.manifests}/default.license"
- fullpath="META-INF/LICENSE" />
- </jar>
-
- <jar jarfile="${tomcat-embed-log4j-src.jar}"
- manifest="${tomcat.manifests}/default.manifest">
- <fileset
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java">
- <include name="org/apache/juli/logging/*.java" />
- <include name="org/apache/juli/logging/impl/*.java" />
- <!-- Javadoc and i18n exclusions -->
- <exclude name="**/package.html" />
- <exclude name="**/LocalStrings_*" />
- </fileset>
- <fileset dir="java">
- <include name="org/apache/juli/*" />
- <!-- Javadoc and i18n exclusions -->
- <exclude name="**/package.html" />
- <exclude name="**/LocalStrings_*" />
- </fileset>
- <zipfileset file="${tomcat.manifests}/default.notice"
- fullpath="META-INF/NOTICE" />
- <zipfileset file="${tomcat.manifests}/default.license"
- fullpath="META-INF/LICENSE" />
- </jar>
-
- </target>
-
<target name="dist-prepare" depends="download-dist">
<mkdir dir="${tomcat.dist}"/>
<mkdir dir="${tomcat.dist}/bin"/>
Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml?rev=1751465&r1=1751464&r2=1751465&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Tue Jul 5 13:24:48 2016
@@ -178,6 +178,17 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Extras">
+ <changelog>
+ <scode>
+ <bug>58588</bug>: Remove the JULI extras package from the distribution.
+ It was only useful for switching Tomcat's internal logging to log4j
+ 1.2.x and that version of log4j is no longer supported. No additional
+ Tomcat code is required if switching Tomcat's internal logging to log
+ via log4j 2.x. (markt)
+ </scode>
+ </changelog>
+ </subsection>
<subsection name="Tribes">
<changelog>
<add>
Modified: tomcat/tc8.5.x/trunk/webapps/docs/logging.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/logging.xml?rev=1751465&r1=1751464&r2=1751465&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/webapps/docs/logging.xml (original)
+++ tomcat/tc8.5.x/trunk/webapps/docs/logging.xml Tue Jul 5 13:24:48 2016
@@ -38,20 +38,19 @@
<p>
The internal logging for Apache Tomcat uses JULI, a packaged renamed fork
of <a href="http://commons.apache.org/logging">Apache Commons Logging</a>
- that, by default, is hard-coded to use the <code>java.util.logging</code>
- framework. This ensures that Tomcat's internal logging and any web
- application logging will remain independent, even if a web application
- uses Apache Commons Logging.
+ that is hard-coded to use the <code>java.util.logging</code> framework.
+ This ensures that Tomcat's internal logging and any web application
+ logging will remain independent, even if a web application uses Apache
+ Commons Logging.
</p>
<p>
To configure Tomcat to use an alternative logging framework for its
- internal logging, one has to replace the JULI implementation that is
- hard-coded to use <code>java.util.logging</code> with a JULI
- implementation that retains the full Commons Logging discovery mechanism.
- Such an implementation 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 <a href="#Using_Log4j">below</a>.
+ internal logging, follow the instructions provided by the alternative
+ logging framework for redirecting logging for applications that use
+ <code>java.util.logging</code>. Keep in mind that the alternative logging
+ framework will need to be capable of working in an environment where
+ different loggers with the same name may exist in different class
loaders.
</p>
<p>
@@ -407,205 +406,5 @@ java.util.logging.ConsoleHandler.formatt
</section>
- <section name="Using Log4j">
- <p>
- This section explains how to configure Tomcat to use
- <a href="http://logging.apache.org/log4j/">log4j</a> rather than
- java.util.logging for all Tomcat's internal logging.
- </p>
- <p><em>Note</em>: The steps described in this section are needed
- when you want to reconfigure Tomcat to use Apache log4j for its own
- logging. These steps are <strong>not</strong> needed if you just want
- to use log4j in your own web application. — In that case, just
- put <code>log4j.jar</code> and <code>log4j.properties</code> into
- <code>WEB-INF/lib</code> and <code>WEB-INF/classes</code>
- of your web application.
- </p>
- <p>
- The following steps describe configuring log4j to output Tomcat's
- internal logging.
- </p>
-
- <ol>
- <li>Create a file called <code>log4j.properties</code> with the
- following content and save it into <code>$CATALINA_BASE/lib</code></li>
- </ol>
- <source><![CDATA[
-log4j.rootLogger = INFO, CATALINA
-
-# Define all the appenders
-log4j.appender.CATALINA = org.apache.log4j.DailyRollingFileAppender
-log4j.appender.CATALINA.File = ${catalina.base}/logs/catalina
-log4j.appender.CATALINA.Append = true
-log4j.appender.CATALINA.Encoding = UTF-8
-# Roll-over the log once per day
-log4j.appender.CATALINA.DatePattern = '.'yyyy-MM-dd'.log'
-log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout
-log4j.appender.CATALINA.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
-
-log4j.appender.LOCALHOST = org.apache.log4j.DailyRollingFileAppender
-log4j.appender.LOCALHOST.File = ${catalina.base}/logs/localhost
-log4j.appender.LOCALHOST.Append = true
-log4j.appender.LOCALHOST.Encoding = UTF-8
-log4j.appender.LOCALHOST.DatePattern = '.'yyyy-MM-dd'.log'
-log4j.appender.LOCALHOST.layout = org.apache.log4j.PatternLayout
-log4j.appender.LOCALHOST.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
-
-log4j.appender.MANAGER = org.apache.log4j.DailyRollingFileAppender
-log4j.appender.MANAGER.File = ${catalina.base}/logs/manager
-log4j.appender.MANAGER.Append = true
-log4j.appender.MANAGER.Encoding = UTF-8
-log4j.appender.MANAGER.DatePattern = '.'yyyy-MM-dd'.log'
-log4j.appender.MANAGER.layout = org.apache.log4j.PatternLayout
-log4j.appender.MANAGER.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
-
-log4j.appender.HOST-MANAGER = org.apache.log4j.DailyRollingFileAppender
-log4j.appender.HOST-MANAGER.File = ${catalina.base}/logs/host-manager
-log4j.appender.HOST-MANAGER.Append = true
-log4j.appender.HOST-MANAGER.Encoding = UTF-8
-log4j.appender.HOST-MANAGER.DatePattern = '.'yyyy-MM-dd'.log'
-log4j.appender.HOST-MANAGER.layout = org.apache.log4j.PatternLayout
-log4j.appender.HOST-MANAGER.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
-
-log4j.appender.CONSOLE = org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Encoding = UTF-8
-log4j.appender.CONSOLE.layout = org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
-
-# Configure which loggers log to which appenders
-log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost] =
INFO, LOCALHOST
-log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]
=\
- INFO, MANAGER
-log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager]
=\
- INFO, HOST-MANAGER]]></source>
- <ol start="2">
- <li><a href="http://logging.apache.org/log4j">Download Log4J</a>
- (Tomcat requires v1.2.x).</li>
-
- <li><p>Download or build <code>tomcat-juli.jar</code> and
- <code>tomcat-juli-adapters.jar</code> that are available as an "extras"
- component for Tomcat. See <a href="extras.html">Additional Components
- documentation</a> for details.</p>
- <p>This <code>tomcat-juli.jar</code> differs from the default one. It
- contains the full Apache Commons Logging implementation and thus is
- able to discover the presence of log4j and configure itself.</p>
- </li>
-
- <li><p>If you want to configure Tomcat to use log4j globally:</p>
- <ul>
- <li>Put <code>log4j.jar</code> and
- <code>tomcat-juli-adapters.jar</code> from "extras" into
- <code>$CATALINA_HOME/lib</code>.</li>
- <li>Replace <code>$CATALINA_HOME/bin/tomcat-juli.jar</code> with
- <code>tomcat-juli.jar</code> from "extras".</li>
- </ul>
- </li>
-
- <li><p>If you are running Tomcat with separate
- <code>$CATALINA_HOME</code> and <code>$CATALINA_BASE</code> and want to
- configure to use log4j in a single <code>$CATALINA_BASE</code>
only:</p>
-
- <ul>
- <li>Create <code>$CATALINA_BASE/bin</code> and
- <code>$CATALINA_BASE/lib</code> directories if they do not exist.
- </li>
- <li>Put <code>log4j.jar</code> and
- <code>tomcat-juli-adapters.jar</code> from "extras" into
- <code>$CATALINA_BASE/lib</code></li>
- <li>Put <code>tomcat-juli.jar</code> from "extras" as
- <code>$CATALINA_BASE/bin/tomcat-juli.jar</code></li>
- <li>If you are running with a
- <a href="security-manager-howto.html">security manager</a>, you
- would need to edit the
- <code>$CATALINA_BASE/conf/catalina.policy</code> file to adjust
- it to using a different copy of tomcat-juli.jar.</li>
- </ul>
-
- <p>Note: This works because libraries, if they exist in
- <code>$CATALINA_BASE</code>, are loaded in preference to the same
- library in <code>$CATALINA_HOME</code>.</p>
-
- <p>Note: tomcat-juli.jar is loaded from <code>$CATALINA_BASE</code>/bin
- not <code>$CATALINA_BASE</code>/lib as it is loaded as part of the
- bootstrap process and all the bootstrap classes are loaded from
bin.</p>
- </li>
-
- <li><p>Delete <code>$CATALINA_BASE/conf/logging.properties</code> to
- prevent java.util.logging generating zero length log files.</p></li>
-
- <li><p>Start Tomcat</p></li>
- </ol>
-
- <p>
- This log4j configuration mirrors the default java.util.logging setup
- that ships with Tomcat: both the manager and host-manager apps get an
- individual log file, and everything else goes to the "catalina.log" log
- file. Each file is rolled-over once per day.
- </p>
-
- <p>
- You can (and should) be more picky about which packages to include
- in the logging. Tomcat defines loggers by Engine and Host names.
- For example, for a more detailed Catalina localhost log, add this to the
- end of the log4j.properties above. Note that there are known issues with
- using this naming convention (with square brackets) in log4j XML based
- configuration files, so we recommend you use a properties file as
- described until a future version of log4j allows this convention.
- </p>
-
<source><![CDATA[log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG
-log4j.logger.org.apache.catalina.core=DEBUG
-log4j.logger.org.apache.catalina.session=DEBUG]]></source>
-
- <p>
- Be warned: a level of DEBUG will produce megabytes of logging and slow
- startup of Tomcat. This level should be used sparingly when debugging of
- internal Tomcat operations is required.
- </p>
-
- <p>
- Your web applications should certainly use their own log4j configuration.
- This is valid <i>with</i> the above configuration. You would place a
- similar log4j.properties file in your web application's WEB-INF/classes
- directory, and log4jx.y.z.jar into WEB-INF/lib. Then specify your package
- level logging. This is a basic setup of log4j which does *not* require
- Commons-Logging, and you should consult the
- <a href="http://logging.apache.org/log4j/docs/documentation.html">log4j
- documentation</a> for more options. This page is intended only as a
- bootstrapping guide.
- </p>
-
- <p><em>Additional notes</em></p>
- <ul>
- <li><p>This exposes log4j libraries to the web applications through the
- Common classloader. See <a href="class-loader-howto.html">class
loading</a>
- documentation for details.</p>
- <p>Because of that, the web applications and libraries using
- <a href="http://commons.apache.org/logging">Apache Commons Logging</a>
- 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
- <code>${catalina.base}/conf/logging.properties</code> file is still
- 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 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_Logging">Valves</a>
- for specific configuration details.</p></li>
- </ul>
- </section>
-
</body>
</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]