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/24 22:02:22 UTC

svn commit: r532061 - in /logging/sandbox/log4j/receivers: ./ build.xml pom.xml src/main/java/org/apache/log4j/db/DBReceiverJob.java src/test/java/org/apache/log4j/helpers/UtilLoggingLevelTest.java

Author: carnold
Date: Tue Apr 24 13:02:21 2007
New Revision: 532061

URL: http://svn.apache.org/viewvc?view=rev&rev=532061
Log:
Bug 42102: Remove ref for o.a.l.h.Constants, use javaee dependency to eliminate manual download, add test

Added:
    logging/sandbox/log4j/receivers/src/test/java/org/apache/log4j/helpers/UtilLoggingLevelTest.java
Modified:
    logging/sandbox/log4j/receivers/   (props changed)
    logging/sandbox/log4j/receivers/build.xml
    logging/sandbox/log4j/receivers/pom.xml
    logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/DBReceiverJob.java

Propchange: logging/sandbox/log4j/receivers/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Apr 24 13:02:21 2007
@@ -1 +1,4 @@
 target
+surefire*
+apache-log4j-receivers.*
+cobertura.ser

Modified: logging/sandbox/log4j/receivers/build.xml
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/receivers/build.xml?view=diff&rev=532061&r1=532060&r2=532061
==============================================================================
--- logging/sandbox/log4j/receivers/build.xml (original)
+++ logging/sandbox/log4j/receivers/build.xml Tue Apr 24 13:02:21 2007
@@ -40,7 +40,7 @@
     <property name="junit.version" value="3.8.1"/>
 	<property name="oro.version" value="2.0.8"/>
 	<property name="component.version" value="0.1-SNAPSHOT"/>
-	<property name="jms.version" value="1.1"/>
+	<property name="javaee.version" value="5"/>
 	
 	<!--  Dependency locations - assumed to be in Maven 2 repository   -->
     <property name="junit.jar" 
@@ -51,8 +51,8 @@
        location="${m2_repo}/log4j/apache-log4j-component/${component.version}/apache-log4j-component-${component.version}.jar"/>
     <property name="oro.jar" 
        location="${m2_repo}/oro/oro/${oro.version}/oro-${oro.version}.jar"/>
-    <property name="jms.jar"
-	   location="${m2_repo}/javax/jms/jms/${jms.version}/jms-${jms.version}.jar"/>
+    <property name="javaee.jar"
+	   location="${m2_repo}/javaee/javaee-api/${javaee.version}/javaee-api-${javaee.version}.jar"/>
 
     <!--   Java compiler settings   -->
     <property name="javac.source" value="1.3"/>
@@ -66,7 +66,7 @@
     	<delete dir="target"/>
     </target>
     
-    <path id="compile-classpath" path="${log4j.jar}:${oro.jar}:${component.jar}:${jms.jar}"/>
+    <path id="compile-classpath" path="${log4j.jar}:${oro.jar}:${component.jar}:${javaee.jar}"/>
 	<path id="test-classpath">
 		<path refid="compile-classpath"/>
 		<pathelement location="target/classes"/>
@@ -134,8 +134,4 @@
     	    <formatter type="plain" usefile="false"/>
     	</junit>
     </target>    
-	
-	<!--  This target is executed by Gump.  -->
-	<target name="gump" depends="test"/>
-
 </project>

Modified: logging/sandbox/log4j/receivers/pom.xml
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/receivers/pom.xml?view=diff&rev=532061&r1=532060&r2=532061
==============================================================================
--- logging/sandbox/log4j/receivers/pom.xml (original)
+++ logging/sandbox/log4j/receivers/pom.xml Tue Apr 24 13:02:21 2007
@@ -120,6 +120,13 @@
   </plugin> 
     </plugins>
 </build>
+<repositories>
+	<repository>
+  		<id>java.net</id>
+  		<url>https://maven-repository.dev.java.net/nonav/repository</url>
+  		<layout>legacy</layout>
+	</repository>
+</repositories>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
@@ -148,9 +155,9 @@
       <version>2.0.8</version>
     </dependency>  
     <dependency>
-      <groupId>javax.jms</groupId>
-      <artifactId>jms</artifactId>
-      <version>1.1</version>
+      <groupId>javaee</groupId>
+      <artifactId>javaee-api</artifactId>
+      <version>5</version>
     </dependency>  
   </dependencies>
   <reporting>

Modified: logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/DBReceiverJob.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/DBReceiverJob.java?view=diff&rev=532061&r1=532060&r2=532061
==============================================================================
--- logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/DBReceiverJob.java (original)
+++ logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/DBReceiverJob.java Tue Apr 24 13:02:21 2007
@@ -19,7 +19,6 @@
 
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
-import org.apache.log4j.helpers.Constants;
 import org.apache.log4j.scheduler.Job;
 import org.apache.log4j.spi.ComponentBase;
 import org.apache.log4j.spi.LoggerRepository;
@@ -133,7 +132,7 @@
 
 
         // Scott asked for this info to be
-        event.setProperty(Constants.LOG4J_ID_KEY, Long.toString(id));
+        event.setProperty("log4jid", Long.toString(id));
 
         if ((mask & DBHelper.PROPERTIES_EXIST) != 0) {
           getProperties(connection, id, event);

Added: logging/sandbox/log4j/receivers/src/test/java/org/apache/log4j/helpers/UtilLoggingLevelTest.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/receivers/src/test/java/org/apache/log4j/helpers/UtilLoggingLevelTest.java?view=auto&rev=532061
==============================================================================
--- logging/sandbox/log4j/receivers/src/test/java/org/apache/log4j/helpers/UtilLoggingLevelTest.java (added)
+++ logging/sandbox/log4j/receivers/src/test/java/org/apache/log4j/helpers/UtilLoggingLevelTest.java Tue Apr 24 13:02:21 2007
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.log4j.helpers;
+
+import junit.framework.*;
+
+
+/**
+ * Unit tests for UtilLoggingLevel.
+ */
+
+public class UtilLoggingLevelTest extends TestCase {
+
+    /**
+     * Create new instance of test.
+     *
+     * @param testName test name
+     */
+    public UtilLoggingLevelTest(final String testName) {
+        super(testName);
+    }
+
+    /**
+     * Test toLevel("fiNeSt").
+     */
+    public void testToLevelFINEST() {
+        assertSame(UtilLoggingLevel.FINEST, UtilLoggingLevel.toLevel("fiNeSt"));
+    }
+
+}
+



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