You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2007/04/29 04:46:58 UTC

svn commit: r533457 - in /logging/sandbox/juli-to-log4j-bridge: ./ build.xml pom.xml src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java

Author: carnold
Date: Sat Apr 28 19:46:58 2007
New Revision: 533457

URL: http://svn.apache.org/viewvc?view=rev&rev=533457
Log:
Paul's change from email, Ant build fixes, PluginConf->DOMConfig

Modified:
    logging/sandbox/juli-to-log4j-bridge/   (props changed)
    logging/sandbox/juli-to-log4j-bridge/build.xml
    logging/sandbox/juli-to-log4j-bridge/pom.xml
    logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java

Propchange: logging/sandbox/juli-to-log4j-bridge/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Apr 28 19:46:58 2007
@@ -2,3 +2,7 @@
 .settings
 .classpath
 .project
+apache-juli-log4j-bridge*
+cobertura.ser
+
+

Modified: logging/sandbox/juli-to-log4j-bridge/build.xml
URL: http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/build.xml?view=diff&rev=533457&r1=533456&r2=533457
==============================================================================
--- logging/sandbox/juli-to-log4j-bridge/build.xml (original)
+++ logging/sandbox/juli-to-log4j-bridge/build.xml Sat Apr 28 19:46:58 2007
@@ -27,7 +27,7 @@
     <property file="build.properties"/>
 	
 	<!--  project details  -->
-    <property name="project.name" value="apache-log4j-bridge"/>
+    <property name="project.name" value="apache-juli-log4j-bridge"/>
     <property name="project.title" value="Apache java.util.logging Bridge Companion for log4j 1.2"/>
     <property name="project.version" value="0.1-SNAPSHOT"/>
     <property name="project.jar" value="${project.name}-${project.version}.jar"/>
@@ -36,14 +36,17 @@
     <property name="m2_repo" location="${user.home}/.m2/repository"/>
 
 	<!--  Versions for dependencies   -->
-    <property name="log4j.version" value="1.2.14"/>
+    <property name="log4j.version" value="1.2.15"/>
     <property name="junit.version" value="3.8.1"/>
+	<property name="component.version" value="0.1-SNAPSHOT"/>
 	
 	<!--  Dependency locations - assumed to be in Maven 2 repository   -->
     <property name="junit.jar" 
        location="${m2_repo}/junit/junit/${junit.version}/junit-${junit.version}.jar"/>
     <property name="log4j.jar" 
        location="${m2_repo}/log4j/log4j/${log4j.version}/log4j-${log4j.version}.jar"/>
+    <property name="component.jar" 
+       location="${m2_repo}/log4j/apache-log4j-component/${component.version}/apache-log4j-component-${component.version}.jar"/>
 
     <!--   Java compiler settings   -->
     <property name="javac.source" value="1.3"/>
@@ -66,7 +69,7 @@
     	   debug="${javac.debug}"
     	   target="${javac.target}"
     	   source="${javac.source}"
-    	   classpath="${log4j.jar}"/>
+    	   classpath="${log4j.jar}:${component.jar}"/>
     	<copy todir="target/classes">
     	    <fileset dir="src/main/resources"/>
     	</copy>
@@ -97,7 +100,7 @@
     	   debug="${javac.debug}"
     	   target="${javac.target}"
     	   source="${javac.source}"
-    	   classpath="${log4j.jar}:${junit.jar}:target/classes"/>
+    	   classpath="${log4j.jar}:${junit.jar}:target/classes:${component.jar}"/>
     	<copy todir="target/test-classes">
     		<fileset dir="src/test/resources"/>
     	</copy>
@@ -106,7 +109,7 @@
 
     <target name="test" depends="test-compile" description="Run unit tests">
     	<junit printsummary="yes">
-    	    <classpath path="target/test-classes:target/classes:${log4j.jar}"/>
+    	    <classpath path="target/test-classes:target/classes:${log4j.jar}:${component.jar}"/>
     		<batchtest>
     			<fileset dir="src/test/java/">
     				<include name="**/*TestCase.java"/>

Modified: logging/sandbox/juli-to-log4j-bridge/pom.xml
URL: http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/pom.xml?view=diff&rev=533457&r1=533456&r2=533457
==============================================================================
--- logging/sandbox/juli-to-log4j-bridge/pom.xml (original)
+++ logging/sandbox/juli-to-log4j-bridge/pom.xml Sat Apr 28 19:46:58 2007
@@ -1,23 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.logging</groupId>
   <artifactId>apache-juli-log4j-bridge</artifactId>
   <version>0.1.0</version>
-  <dependencies>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>1.2.15</version>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  
   <description>Bridge JDK 1.4+ java.util.Logging to Apache log4j</description>
   <url>http://logging.apache.org/log4j</url>
 <issueManagement>
@@ -74,7 +60,6 @@
    	   <name>Paul Smith</name>
    	   <email>psmith@apache.org</email>
    	</developer>
-   	<!--  TODO: Many more need to be here -->
 </developers>
 <licenses>
 	<license>
@@ -111,7 +96,6 @@
             <target>1.3</target>
         </configuration>
       </plugin>
-	<!-- clean stray cobertura.ser -->
   <plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>cobertura-maven-plugin</artifactId> 
@@ -126,6 +110,24 @@
   </plugin>       
     </plugins>
 </build>
+  <dependencies>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.15</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>apache-log4j-component</artifactId>
+      <version>0.1-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
   <reporting>
     <plugins>
       <plugin>
@@ -138,7 +140,6 @@
         <artifactId>maven-javadoc-plugin</artifactId>
       </plugin>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-project-info-reports-plugin</artifactId>
       </plugin>
       <plugin>
@@ -148,12 +149,13 @@
 	<plugin> 
  		<groupId>org.codehaus.mojo</groupId> 
  		<artifactId>cobertura-maven-plugin</artifactId>
-		<!-- version 2.1 was flawed and reports 100% coverage  -->
 		<version>2.0</version>
 	</plugin> 
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-changes-plugin</artifactId>
+        <configuration>
+          <issueLinkTemplate>%URL%/show_bug.cgi?id=%ISSUE%</issueLinkTemplate>
+        </configuration>
       	<reportSets>
           <reportSet>
             <reports>
@@ -161,9 +163,6 @@
             </reports>
           </reportSet>
         </reportSets>
-        <configuration>
-        	<issueLinkTemplate>%URL%/show_bug.cgi?id=%ISSUE%</issueLinkTemplate>
-        </configuration>
       </plugin>      
     </plugins>
   </reporting>

Modified: logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java
URL: http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java?view=diff&rev=533457&r1=533456&r2=533457
==============================================================================
--- logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java (original)
+++ logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java Sat Apr 28 19:46:58 2007
@@ -116,4 +116,14 @@
         assimilate(LogManager.getLoggerRepository());
     }
 
+    /**
+     * Reverse of {@link #assimilate()}, disconnects the bridge
+     * from the java.util.logging subsystem by resetting that framework
+     * back to it's default configuration.
+     */
+    public static void repatriate() {
+        java.util.logging.LogManager.getLogManager().reset();
+        
+    }
+
 }



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