Added AvalonLogger which wraps the logger used by the Avalon framework. Also added an optional dependency on avalon-framework.jar. Added better warnings to build about which loggers are going to be created.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138979 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -4,9 +4,12 @@ log4j.jar=/java/log4j/log4j.jar
|
|||||||
# logkit.jar - Avalon LogKit classes (see http://jakarta.apache.org/avalon)
|
# logkit.jar - Avalon LogKit classes (see http://jakarta.apache.org/avalon)
|
||||||
logkit.jar=/java/logkit/logkit.jar
|
logkit.jar=/java/logkit/logkit.jar
|
||||||
|
|
||||||
|
# Avalon framework - used for wrapper for avalon framework logger
|
||||||
|
avalon-framework.jar=../../Avalon-4.1.4/avalon-framework-4.1.4.jar
|
||||||
|
|
||||||
#
|
#
|
||||||
# if you want to run the test cases, junit needs to be in the classpath.
|
# if you want to run the test cases, junit needs to be in the classpath.
|
||||||
# the build.xml uses a default value so you might not need to set this property.
|
# the build.xml uses a default value so you might not need to set this property.
|
||||||
#
|
#
|
||||||
# junit.jar=../../jakarta-velocity/build/lib/junit-3.7.jar
|
# junit.jar=../../jakarta-velocity/build/lib/junit-3.7.jar
|
||||||
|
|
||||||
|
|||||||
59
build.xml
59
build.xml
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
"Logging" component of the Jakarta Commons Subproject
|
"Logging" component of the Jakarta Commons Subproject
|
||||||
$Id: build.xml,v 1.35 2003/04/07 09:36:10 rdonkin Exp $
|
$Id: build.xml,v 1.36 2003/05/07 16:02:20 rdonkin Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
<property name="junit.jar" value="${junit.home}/junit.jar"/>
|
<property name="junit.jar" value="${junit.home}/junit.jar"/>
|
||||||
<property name="log4j.jar" value="${jakarta.home}/jakarta-log4j/dist/lib/log4j.jar"/>
|
<property name="log4j.jar" value="${jakarta.home}/jakarta-log4j/dist/lib/log4j.jar"/>
|
||||||
<property name="logkit.jar" value="${jakarta.home}/jakarta-avalon-logkit/build/log/logkit"/>
|
<property name="logkit.jar" value="${jakarta.home}/jakarta-avalon-logkit/build/log/logkit"/>
|
||||||
|
<property name="avalon-framework.jar" value="../../Avalon-4.1.4/avalon-framework-4.1.4.jar"/>
|
||||||
|
|
||||||
|
|
||||||
<!-- ========== Component Declarations ==================================== -->
|
<!-- ========== Component Declarations ==================================== -->
|
||||||
@@ -81,6 +82,7 @@
|
|||||||
<pathelement location="${junit.jar}"/>
|
<pathelement location="${junit.jar}"/>
|
||||||
<pathelement location="${log4j.jar}"/>
|
<pathelement location="${log4j.jar}"/>
|
||||||
<pathelement location="${logkit.jar}"/>
|
<pathelement location="${logkit.jar}"/>
|
||||||
|
<pathelement location="${avalon-framework.jar}"/>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
|
|
||||||
@@ -94,6 +96,7 @@
|
|||||||
<pathelement location="${junit.jar}"/>
|
<pathelement location="${junit.jar}"/>
|
||||||
<pathelement location="${log4j.jar}"/>
|
<pathelement location="${log4j.jar}"/>
|
||||||
<pathelement location="${logkit.jar}"/>
|
<pathelement location="${logkit.jar}"/>
|
||||||
|
<pathelement location="${avalon-framework.jar}"/>
|
||||||
<pathelement location="${conf.home}"/>
|
<pathelement location="${conf.home}"/>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
@@ -134,15 +137,15 @@
|
|||||||
<filter token="name" value="${component.name}"/>
|
<filter token="name" value="${component.name}"/>
|
||||||
<filter token="package" value="${component.package}"/>
|
<filter token="package" value="${component.package}"/>
|
||||||
<filter token="version" value="${component.version}"/>
|
<filter token="version" value="${component.version}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="prepare" depends="init"
|
<target name="prepare" depends="init"
|
||||||
description="Prepare build directory">
|
description="Prepare build directory">
|
||||||
|
|
||||||
<echo>
|
<echo>
|
||||||
${log4j.jar}
|
Log4j: ${log4j.jar}
|
||||||
${logkit.jar}
|
LogKit: ${logkit.jar}
|
||||||
|
Avalon-Framework: ${avalon-framework.jar}
|
||||||
</echo>
|
</echo>
|
||||||
|
|
||||||
<mkdir dir="${build.home}"/>
|
<mkdir dir="${build.home}"/>
|
||||||
@@ -163,12 +166,10 @@
|
|||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="compile" depends="static,compile-only"
|
<target name="compile" depends="static,compile-only"
|
||||||
description="Compile shareable components"/>
|
description="Compile shareable components"/>
|
||||||
|
|
||||||
<target name="compile-only" depends="init" >
|
<target name='discovery' depends='init'>
|
||||||
|
|
||||||
<available property="jdk.1.4.present"
|
<available property="jdk.1.4.present"
|
||||||
classname="java.util.logging.Logger"/>
|
classname="java.util.logging.Logger"/>
|
||||||
<available classname="org.apache.log4j.Logger"
|
<available classname="org.apache.log4j.Logger"
|
||||||
@@ -177,10 +178,48 @@
|
|||||||
<available property="logkit.present"
|
<available property="logkit.present"
|
||||||
classpathref="compile.classpath"
|
classpathref="compile.classpath"
|
||||||
classname="org.apache.log.Logger"/>
|
classname="org.apache.log.Logger"/>
|
||||||
|
<available property="avalon-framework.present"
|
||||||
|
classpathref="compile.classpath"
|
||||||
|
classname="org.apache.avalon.framework.logger.Logger"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="log4j-warning" unless='log4j.present' depends='init,discovery'>
|
||||||
|
<echo>
|
||||||
|
*** WARNING ***
|
||||||
|
Log4j not found: Cannot Build Log4jLogger
|
||||||
|
</echo>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="logkit-warning" unless='logkit.present' depends='init,discovery'>
|
||||||
|
<echo>
|
||||||
|
*** WARNING ***
|
||||||
|
LogKit not found: Cannot Build LogKitLogger
|
||||||
|
</echo>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="avalon-framework-warning" unless='avalon-framework.present' depends='init,discovery'>
|
||||||
|
<echo>
|
||||||
|
*** WARNING ***
|
||||||
|
Avalon-Framework not found: Cannot Build AvalonLogger
|
||||||
|
</echo>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jdk1.4-warning" unless='jdk.1.4.present' depends='init,discovery'>
|
||||||
|
<echo>
|
||||||
|
*** WARNING ***
|
||||||
|
JDK 1.4 not present: Cannot Build Jdk14Logger
|
||||||
|
</echo>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name='warning' depends='log4j-warning,logkit-warning,jdk1.4-warning,avalon-framework-warning'/>
|
||||||
|
|
||||||
|
|
||||||
|
<target name="compile-only" depends="init,discovery,warning" >
|
||||||
|
|
||||||
<echo message="jdk.1.4.present=${jdk.1.4.present}"/>
|
<echo message="jdk.1.4.present=${jdk.1.4.present}"/>
|
||||||
<echo message="log4j.present=${log4j.present}"/>
|
<echo message="log4j.present=${log4j.present}"/>
|
||||||
<echo message="logkit.present=${logkit.present}"/>
|
<echo message="logkit.present=${logkit.present}"/>
|
||||||
|
<echo message="avalon-framework.present=${avalon-framework.present}"/>
|
||||||
|
|
||||||
<javac srcdir="${source.home}"
|
<javac srcdir="${source.home}"
|
||||||
destdir="${build.home}/classes"
|
destdir="${build.home}/classes"
|
||||||
@@ -196,6 +235,8 @@
|
|||||||
unless="log4j.present"/>
|
unless="log4j.present"/>
|
||||||
<exclude name="org/apache/commons/logging/impl/LogKitLogger.java"
|
<exclude name="org/apache/commons/logging/impl/LogKitLogger.java"
|
||||||
unless="logkit.present"/>
|
unless="logkit.present"/>
|
||||||
|
<exclude name="org/apache/commons/logging/impl/AvalonLogger.java"
|
||||||
|
unless="avalon-framework.present"/>
|
||||||
</javac>
|
</javac>
|
||||||
<copy todir="${build.home}/classes" filtering="on">
|
<copy todir="${build.home}/classes" filtering="on">
|
||||||
<fileset dir="${source.home}" excludes="**/*.java"/>
|
<fileset dir="${source.home}" excludes="**/*.java"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user