[logback-dev] svn commit: r1525 - logback/trunk/log4j-bridge/src/test/java/org/apache/log4j

noreply.ceki at qos.ch noreply.ceki at qos.ch
Thu May 3 21:46:21 CEST 2007


Author: ceki
Date: Thu May  3 21:46:20 2007
New Revision: 1525

Modified:
   logback/trunk/log4j-bridge/src/test/java/org/apache/log4j/LoggerTest.java

Log:
added test case for bug 63

http://bugzilla.qos.ch/show_bug.cgi?id=63

Modified: logback/trunk/log4j-bridge/src/test/java/org/apache/log4j/LoggerTest.java
==============================================================================
--- logback/trunk/log4j-bridge/src/test/java/org/apache/log4j/LoggerTest.java	(original)
+++ logback/trunk/log4j-bridge/src/test/java/org/apache/log4j/LoggerTest.java	Thu May  3 21:46:20 2007
@@ -80,6 +80,10 @@
   public void testPrintAPI() {
     Exception e = new Exception("just testing");
 
+    log4jLogger.trace(null);
+    assertEquals(1, appender.list.size());
+    appender.list.clear();
+    
     log4jLogger.debug(null);
     assertEquals(1, appender.list.size());
     appender.list.clear();
@@ -145,5 +149,20 @@
     appender.list.clear();
 
   }
+  
+  public void testLogAPI() {
+    log4jLogger.log("x", Level.TRACE, "x", null);
+    assertEquals(0, appender.list.size());
+
+    log4jLogger.log("x", Level.DEBUG, "x", null);
+    log4jLogger.log("x", Level.INFO, "x", null);
+    log4jLogger.log("x", Level.WARN, "x", null);
+    log4jLogger.log("x", Level.ERROR, "x", null);
+    log4jLogger.log("x", Level.FATAL, "x", null);
+
+    assertEquals(5, appender.list.size());
+    appender.list.clear();
+
+  }
 
 }



More information about the logback-dev mailing list