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/20 04:53:33 UTC

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

Author: gregor
Date: Wed Jan 19 19:53:31 2005
New Revision: 125705

URL: http://svn.apache.org/viewcvs?view=rev&rev=125705
Log:
Made log4j the log system used by Lenya, and start using log4j.xconf for configuration. This obviates the need for absolute paths in the log4j configuration.
Removed:
   lenya/trunk/src/java/log4j-properties.xsl
Modified:
   lenya/trunk/build.properties
   lenya/trunk/src/targets/init-build.xml
   lenya/trunk/src/webapp/WEB-INF/web-xml.xsl

Modified: lenya/trunk/build.properties
Url: http://svn.apache.org/viewcvs/lenya/trunk/build.properties?view=diff&rev=125705&p1=lenya/trunk/build.properties&r1=125704&p2=lenya/trunk/build.properties&r2=125705
==============================================================================
--- lenya/trunk/build.properties	(original)
+++ lenya/trunk/build.properties	Wed Jan 19 19:53:31 2005
@@ -65,9 +65,6 @@
 
 # Tomcat 5.x
 tomcat.cache.dir=${tomcat.home.dir}/work/Catalina/localhost/lenya
-# Tomcat 4.x
-#tomcat.cache.dir=${tomcat.home.dir}/work/Standalone/localhost/lenya
-
 
 #------------------------------------------------------------------------------------
 # Where the 'install' build target should copy the endorsed libraries
@@ -90,15 +87,6 @@
 # (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/trunk/src/java/log4j-properties.xsl
Url: http://svn.apache.org/viewcvs/lenya/trunk/src/java/log4j-properties.xsl?view=auto&rev=125704
==============================================================================

Modified: lenya/trunk/src/targets/init-build.xml
Url: http://svn.apache.org/viewcvs/lenya/trunk/src/targets/init-build.xml?view=diff&rev=125705&p1=lenya/trunk/src/targets/init-build.xml&r1=125704&p2=lenya/trunk/src/targets/init-build.xml&r2=125705
==============================================================================
--- lenya/trunk/src/targets/init-build.xml	(original)
+++ lenya/trunk/src/targets/init-build.xml	Wed Jan 19 19:53:31 2005
@@ -182,26 +182,11 @@
     <mkdir dir="${build.webapp}"/>
   </target>
 
-
   <!-- ============================================================ -->
   <!-- Prepares the source code                                     -->
   <!-- ============================================================ -->
   <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}">

Modified: lenya/trunk/src/webapp/WEB-INF/web-xml.xsl
Url: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/WEB-INF/web-xml.xsl?view=diff&rev=125705&p1=lenya/trunk/src/webapp/WEB-INF/web-xml.xsl&r1=125704&p2=lenya/trunk/src/webapp/WEB-INF/web-xml.xsl&r2=125705
==============================================================================
--- lenya/trunk/src/webapp/WEB-INF/web-xml.xsl	(original)
+++ lenya/trunk/src/webapp/WEB-INF/web-xml.xsl	Wed Jan 19 19:53:31 2005
@@ -76,11 +76,22 @@
     </init-param>
   </xsl:template>
 
-  <xsl:template match="/web-app/servlet[position() = 1]/init-param[position() = last()]">
-    <xsl:copy-of select="."/>
-    <init-param>
+  <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>
 

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