NIHVIVO-405 modify build.xml to recognize debug.log4j.properties if it exists, and to use it instead of default.log4j.properties. Clean up svn:ignore properties in webapp/config

This commit is contained in:
jeb228 2010-06-07 15:47:43 +00:00
parent 9f76c1462d
commit c4062267bd
2 changed files with 13 additions and 3 deletions

View file

@ -203,9 +203,16 @@ deploy - Deploy the application directly into the Tomcat webapps directory.
<fileset dir="${webapp.dir}" includes="submodels/**/*" /> <fileset dir="${webapp.dir}" includes="submodels/**/*" />
</copy> </copy>
<copy file="${webapp.dir}/config/default.log4j.properties" <!-- use the production Log4J properties, unless a debug version exists. -->
tofile="${build.dir}/war/WEB-INF/classes/log4j.properties" <available file="${webapp.dir}/config/debug.log4j.properties"
filtering="true"> property="debug.log4j.exists" />
<copy tofile="${build.dir}/war/WEB-INF/classes/log4j.properties"
filtering="true"
overwrite="true">
<fileset dir="${webapp.dir}/config">
<include name="default.log4j.properties" unless="debug.log4j.exists" />
<include name="debug.log4j.properties" if="debug.log4j.exists" />
</fileset>
<filterchain> <filterchain>
<expandproperties /> <expandproperties />
</filterchain> </filterchain>

View file

@ -19,6 +19,9 @@
# #
# More information can be found here: # More information can be found here:
# http://logging.apache.org/log4j/1.2/manual.html # http://logging.apache.org/log4j/1.2/manual.html
#
# The "production" version of this file is default.log4j.properties.
# debug.log4j.properties exists will be used instead, if it exists, but is not stored in Subversion.
log4j.appender.AllAppender=org.apache.log4j.RollingFileAppender log4j.appender.AllAppender=org.apache.log4j.RollingFileAppender
log4j.appender.AllAppender.File= ${tomcat.home}/logs/${webapp.name}.all.log log4j.appender.AllAppender.File= ${tomcat.home}/logs/${webapp.name}.all.log