You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by ba...@apache.org on 2004/01/31 07:06:26 UTC

cvs commit: jakarta-taglibs/log/examples/deploy-conf log4j.properties

bayard      2004/01/30 22:06:26

  Modified:    log      build.xml
  Added:       log/examples/deploy-conf log4j.properties
  Removed:     log/examples/conf log4j.properties
  Log:
  fixed commons-logging missing message, added ability to include an optional log4j jar in the examples war and switched to deploy-conf for the example log4j.properties so a version does not end up in WEB-INF/
  
  Revision  Changes    Path
  1.8       +7 -2      jakarta-taglibs/log/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/log/build.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build.xml	14 Jan 2003 14:43:18 -0000	1.7
  +++ build.xml	31 Jan 2004 06:06:26 -0000	1.8
  @@ -16,10 +16,13 @@
     <target name="checkRequirements.pre">
       <antcall target="checkRequiredFile">
          <param name="file" value="${commons-logging.jar}"/>
  -       <param name="fail.message" value="a jar file containing the log4j classes is required to compile the log taglib. please define the property commons-logging.jar in your build.properties file and ensure that the file exists"/>
  +       <param name="fail.message" value="Please define the property commons-logging.jar in your build.properties file and ensure that the file exists"/>
       </antcall>
     </target>
   
  +  <target name="addLog4jJar" if="log4j-core.jar">
  +    <copy todir="${build.examples}/WEB-INF/lib" file="${log4j-core.jar}"/>
  +  </target>
   
     <!-- =================================================================== -->
     <!-- copy the required jars into the examples lib dir                    -->
  @@ -28,10 +31,12 @@
     <target name="examples.pre">
       <!-- copy a default log4j config file -->
       <copy todir="${build.examples}/WEB-INF/classes">
  -      <fileset dir="${examples.src}/conf" includes="*.properties"/>
  +      <fileset dir="${examples.src}/deploy-conf" includes="log4j.properties"/>
       </copy>
       <!-- copy the jars required -->
       <copy todir="${build.examples}/WEB-INF/lib" file="${commons-logging.jar}"/>
  +    <!-- add an 'if exists'? -->
  +    <antcall target="addLog4jJar"/>
     </target>
   
     &common;
  
  
  
  1.1                  jakarta-taglibs/log/examples/deploy-conf/log4j.properties
  
  Index: log4j.properties
  ===================================================================
  # Sample properties to initialise log4j
  #log4j.rootCategory=debug, stdout, R
  log4j.rootCategory=debug, stdout
  
  log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  
  # Pattern to output the caller's file name and line number.
  log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
  
  log4j.appender.R=org.apache.log4j.RollingFileAppender
  log4j.appender.R.File=logtags.log
  
  log4j.appender.R.MaxFileSize=100KB
  # Keep one backup file
  log4j.appender.R.MaxBackupIndex=2
  
  log4j.appender.R.layout=org.apache.log4j.PatternLayout
  log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org