You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2005/01/27 23:42:51 UTC

svn commit: r128440 - /lenya/branches/BRANCH_1_2_X/build.properties /lenya/branches/BRANCH_1_2_X/src/java/log4j-properties.xsl /lenya/branches/BRANCH_1_2_X/src/targets/init-build.xml /lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/web-xml.xsl

Author: gregor
Date: Thu Jan 27 14:42:49 2005
New Revision: 128440

URL: http://svn.apache.org/viewcvs?view=rev&rev=128440
Log:
Set default logger to log4j and made log4 log file path relative to webapp.
Removed:
   lenya/branches/BRANCH_1_2_X/src/java/log4j-properties.xsl
Modified:
   lenya/branches/BRANCH_1_2_X/build.properties
   lenya/branches/BRANCH_1_2_X/src/targets/init-build.xml
   lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/web-xml.xsl

Modified: lenya/branches/BRANCH_1_2_X/build.properties
Url: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/build.properties?view=diff&rev=128440&p1=lenya/branches/BRANCH_1_2_X/build.properties&r1=128439&p2=lenya/branches/BRANCH_1_2_X/build.properties&r2=128440
==============================================================================
--- lenya/branches/BRANCH_1_2_X/build.properties	(original)
+++ lenya/branches/BRANCH_1_2_X/build.properties	Thu Jan 27 14:42:49 2005
@@ -17,13 +17,12 @@
 #------------------------------------------------------------------------------------
 # The root of the Cocoon source tree
 # NOTE: Lenya cannot be built offline with Cocoon-2.1.5.1 because of a unresolvable
-#       DTD lookup, whereas offline building works with Cocoon-2.1.6
-# NOTE: Cocoon-2.1.5.1 contains Lucene-1.3 whereas Lenya requires Lucene-1.4
+#       DTD lookup. Offline building works with Cocoon-2.1.6 though.
+# NOTE: Cocoon-2.1.5.1 contains Lucene 1.3. Lenya requires Lucene 1.4
 #       Copy lucene-1.4.1.jar to src/webapp/WEB-INF/lib in order to patch it
 #       during the build process
 
 cocoon.src.dir=../cocoon-2.1.6
-#cocoon.src.dir=../cocoon-2.1.5.1
 
 #------------------------------------------------------------------------------------
 # The original, unmodified and expanded cocoon webapp directory
@@ -88,19 +87,10 @@
 
 
 #------------------------------------------------------------------------------------
-# Enable multipart requests
+# Enable file uploads
 # (if you do not need it, you may turn this off for security reasons.)
 
 enable.uploads=false
-
-
-#------------------------------------------------------------------------------------
-# Enable RollingFileAppender of log4j
-
-enable.log4j=true
-log4j.log.file=${user.dir}/build/lenya/webapp/WEB-INF/logs/log4j.log
-#log4j.log.file=${tomcat.webapps.dir}/WEB-INF/logs/log4j.log
-
 
 #------------------------------------------------------------------------------------
 # Anteater and Webtest home directories

Deleted: /lenya/branches/BRANCH_1_2_X/src/java/log4j-properties.xsl
Url: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/java/log4j-properties.xsl?view=auto&rev=128439
==============================================================================

Modified: lenya/branches/BRANCH_1_2_X/src/targets/init-build.xml
Url: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/targets/init-build.xml?view=diff&rev=128440&p1=lenya/branches/BRANCH_1_2_X/src/targets/init-build.xml&r1=128439&p2=lenya/branches/BRANCH_1_2_X/src/targets/init-build.xml&r2=128440
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/targets/init-build.xml	(original)
+++ lenya/branches/BRANCH_1_2_X/src/targets/init-build.xml	Thu Jan 27 14:42:49 2005
@@ -165,25 +165,9 @@
   <!-- ============================================================ -->
   <target name="prepare-src" depends="prepare, build-custom-tasks">
 
-    <echo>INFO: Create log4j.properties (${build.src}/log4j.properties)</echo>
-    <!-- using stylesheet as input file so we don't need a dummy xml -->
-    <xslt
-        in="${java.dir}/log4j-properties.xsl"
-        out="${build.src}/log4j.properties"
-        style="${java.dir}/log4j-properties.xsl"
-        force="false"
-        >
-      <param name="log4j-rollingFileAppender" expression="${enable.log4j}"/>
-      <param name="log4j-rollingFileAppender-File" expression="${log4j.log.file}"/>
-      <param name="webapp-directory" expression="${tomcat.webapps.dir}"/>
-      <outputproperty name="indent" value="yes"/>
-    </xslt>
-
     <echo>INFO: Copy java source files from ${java.dir} to ${build.src}</echo>
     <copy todir="${build.src}" filtering="on">
-      <fileset dir="${java.dir}">
-        <exclude name="log4j-properties.xsl"/>
-      </fileset>
+      <fileset dir="${java.dir}"/>
     </copy>
 
     <!-- FIXME: Use bulkCopy task in the future; needs regexp mapper which is part of ant optional package. -->

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/web-xml.xsl
Url: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/web-xml.xsl?view=diff&rev=128440&p1=lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/web-xml.xsl&r1=128439&p2=lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/web-xml.xsl&r2=128440
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/web-xml.xsl	(original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/web-xml.xsl	Thu Jan 27 14:42:49 2005
@@ -76,14 +76,25 @@
     </init-param>
   </xsl:template>
 
-  <xsl:template match="/web-app/servlet[position() = 1]/init-param[position() = last()]">
-    <xsl:copy-of select="."/>
+  <xsl:template match="/web-app/servlet[position() = 1]/init-param[normalize-space(param-name) = 'form-encoding']">
     <init-param>
       <param-name>form-encoding</param-name>
       <param-value>UTF-8</param-value>
     </init-param>
   </xsl:template>
   
+  <xsl:template match="/web-app/servlet[position() = 1]/init-param[position() = last()-1]">
+    <xsl:copy-of select="."/>
+    <init-param>
+      <param-name>logger-class</param-name>
+      <param-value>org.apache.avalon.excalibur.logger.Log4JLoggerManager</param-value>
+    </init-param>
+    <init-param>
+      <param-name>log4j-config</param-name>
+      <param-value>/WEB-INF/log4j.xconf</param-value>
+    </init-param>
+  </xsl:template>
+
   <xsl:template match="@*|node()">
     <xsl:copy>
       <xsl:apply-templates select="@*|node()"/>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org