[logback-dev] svn commit: r1176 - in logback/trunk/logback-classic/src: main/java/ch/qos/logback/classic main/java/ch/qos/logback/classic/html main/java/ch/qos/logback/classic/joran/action main/java/ch/qos/logback/classic/net test/java/ch/qos/logback/classic test/java/ch/qos/logback/classic/html test/java/ch/qos/logback/classic/joran test/java/ch/qos/logback/classic/net

noreply.ceki at qos.ch noreply.ceki at qos.ch
Mon Jan 8 23:17:26 CET 2007


Author: ceki
Date: Mon Jan  8 23:17:26 2007
New Revision: 1176

Modified:
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/BasicConfigurator.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/ClassicLayout.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/Logger.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/html/HTMLLayout.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LayoutAction.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SocketAppender.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SyslogAppender.java
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/BasicLoggerTest.java
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/HLogger.java
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/MessageFormattingTest.java
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/StringListAppender.java
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/html/HTMLLayoutTest.java
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/BasicJoranTest.java
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppenderTest.java
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppenderTestApp.java

Log:
The Appender and Layout interfaces are now generic. This is a change with wide implications in the code.


Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/BasicConfigurator.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/BasicConfigurator.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/BasicConfigurator.java	Mon Jan  8 23:17:26 2007
@@ -12,6 +12,7 @@
 
 import org.slf4j.LoggerFactory;
 
+import ch.qos.logback.classic.spi.LoggingEvent;
 import ch.qos.logback.core.ConsoleAppender;
 import ch.qos.logback.core.status.InfoStatus;
 import ch.qos.logback.core.status.StatusManager;
@@ -28,7 +29,7 @@
     if(sm != null)  {
      sm.add(new InfoStatus("Setting up default configuration.", hiddenSingleton));
     }
-    ConsoleAppender ca = new ConsoleAppender();
+    ConsoleAppender<LoggingEvent> ca = new ConsoleAppender<LoggingEvent>();
     ca.setContext(lc);
     ca.setName("console");
     PatternLayout pl = new PatternLayout();

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/ClassicLayout.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/ClassicLayout.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/ClassicLayout.java	Mon Jan  8 23:17:26 2007
@@ -4,7 +4,7 @@
 import ch.qos.logback.core.Layout;
 
 
-public interface ClassicLayout extends Layout {
+public interface ClassicLayout extends Layout<LoggingEvent> {
 
   /**
    * Transform an event of type {@link LoggingEvent) and return it as a String after

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/Logger.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/Logger.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/Logger.java	Mon Jan  8 23:17:26 2007
@@ -25,7 +25,7 @@
 import ch.qos.logback.core.spi.AppenderAttachableImpl;
 import ch.qos.logback.core.spi.FilterReply;
 
-public final class Logger implements org.slf4j.Logger, AppenderAttachable,
+public final class Logger implements org.slf4j.Logger, AppenderAttachable<LoggingEvent>,
     Serializable {
 
   /**
@@ -65,7 +65,7 @@
    */
   private List<Logger> childrenList;
 
-  private transient AppenderAttachableImpl aai;
+  private transient AppenderAttachableImpl<LoggingEvent> aai;
   /**
    * Additivity is set to true by default, that is children inherit the
    * appenders of their ancestors by default. If this variable is set to
@@ -221,9 +221,9 @@
     return aai.detachAppender(name);
   }
 
-  public synchronized void addAppender(Appender newAppender) {
+  public synchronized void addAppender(Appender<LoggingEvent> newAppender) {
     if (aai == null) {
-      aai = new AppenderAttachableImpl();
+      aai = new AppenderAttachableImpl<LoggingEvent>();
     }
     aai.addAppender(newAppender);
   }
@@ -242,9 +242,9 @@
     return aai.iteratorForAppenders();
   }
 
-  public Appender getAppender(String name) {
+  public Appender<LoggingEvent> getAppender(String name) {
     if (aai == null) {
-      aai = new AppenderAttachableImpl();
+      return null;
     }
     return aai.getAppender(name);
   }

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java	Mon Jan  8 23:17:26 2007
@@ -45,7 +45,7 @@
  * 
  */
 
-public class PatternLayout extends PatternLayoutBase implements ClassicLayout {
+public class PatternLayout extends PatternLayoutBase<LoggingEvent> {
 
   // FIXME fix exception handling
 
@@ -162,8 +162,4 @@
     return writeLoopOnConverters(event);
   }
 
-  public String doLayout(Object event) {
-    return doLayout((LoggingEvent) event);
-  }
-
 }

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/html/HTMLLayout.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/html/HTMLLayout.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/html/HTMLLayout.java	Mon Jan  8 23:17:26 2007
@@ -33,8 +33,8 @@
  * @author Ceki G&uuml;lc&uuml;
  * @author S&eacute;bastien Pennec
  */
-public class HTMLLayout extends HTMLLayoutBase implements ClassicLayout {
-
+public class HTMLLayout extends HTMLLayoutBase<LoggingEvent> implements ClassicLayout {
+  
   /**
    * Default pattern string for log output.
    */
@@ -55,10 +55,6 @@
     return PatternLayout.defaultConverterMap;
   }
 
-  public String doLayout(Object event) {
-    return doLayout((LoggingEvent) event);
-  }
-
   public String doLayout(LoggingEvent event) {
     StringBuffer buf = new StringBuffer();
     handleTableClosing(buf);

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LayoutAction.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LayoutAction.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LayoutAction.java	Mon Jan  8 23:17:26 2007
@@ -1,14 +1,13 @@
 package ch.qos.logback.classic.joran.action;
 
-import ch.qos.logback.classic.ClassicLayout;
-import ch.qos.logback.core.Layout;
+import ch.qos.logback.classic.spi.LoggingEvent;
 import ch.qos.logback.core.joran.action.AbstractLayoutAction;
 
 
-public class LayoutAction extends AbstractLayoutAction {
+public class LayoutAction extends AbstractLayoutAction<LoggingEvent> {
 
-  protected boolean isOfCorrectType(Layout layout) {
-    return (layout instanceof ClassicLayout);
-  }
+//  protected boolean isOfCorrectType(Layout layout) {
+//    return (layout instanceof ClassicLayout);
+//  }
 
 }

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java	Mon Jan  8 23:17:26 2007
@@ -29,13 +29,13 @@
  * @author S&eacute;bastien Pennec
  * 
  */
-public class SMTPAppender extends SMTPAppenderBase {
+public class SMTPAppender extends SMTPAppenderBase<LoggingEvent> {
 
   static final String DEFAULT_SUBJECT_PATTERN = "%logger{20} - %m %nopex";
   static final String DEFAULT_EVALUATOR_EXPRESSION = "level >= ERROR";
   
   private int bufferSize = 512;
-  protected CyclicBuffer cb = new CyclicBuffer(bufferSize);
+  protected CyclicBuffer<LoggingEvent> cb = new CyclicBuffer<LoggingEvent>(bufferSize);
 
   /**
    * The default constructor will instantiate the appender with a
@@ -70,9 +70,7 @@
    * Perform SMTPAppender specific appending actions, mainly adding the event to
    * a cyclic buffer.
    */
-  protected void subAppend(Object eventObject) {
-    LoggingEvent event = (LoggingEvent) eventObject;
-
+  protected void subAppend(LoggingEvent event) {
     event.getThreadName();
     cb.add(event);
     // addInfo("Added event to the cyclic buffer: " + event.getMessage());
@@ -83,7 +81,7 @@
     int len = cb.length();
     for (int i = 0; i < len; i++) {
       // sbuf.append(MimeUtility.encodeText(layout.format(cb.get())));
-      Object event = cb.get();
+      LoggingEvent event = cb.get();
       sbuf.append(layout.doLayout(event));
     }
   }
@@ -108,7 +106,7 @@
   }
 
   @Override
-  protected Layout makeSubjectLayout(String subjectStr) {
+  protected Layout<LoggingEvent> makeSubjectLayout(String subjectStr) {
     if(subjectStr == null) {
       subjectStr = DEFAULT_SUBJECT_PATTERN;
     }

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SocketAppender.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SocketAppender.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SocketAppender.java	Mon Jan  8 23:17:26 2007
@@ -27,7 +27,7 @@
  * @author S&eacute;bastien Pennec
  */
 
-public class SocketAppender extends SocketAppenderBase {
+public class SocketAppender extends SocketAppenderBase<LoggingEvent> {
 
   boolean includeCallerData = false;
   
@@ -53,7 +53,7 @@
   }
   
   @Override
-  protected void postProcessEvent(Object event) {
+  protected void postProcessEvent(LoggingEvent event) {
   if (includeCallerData) {
       ((LoggingEvent) event).getCallerData();
     } 

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SyslogAppender.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SyslogAppender.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SyslogAppender.java	Mon Jan  8 23:17:26 2007
@@ -28,14 +28,14 @@
  * 
  * @author Ceki G&uumllc&uuml;
  */
-public class SyslogAppender extends SyslogAppenderBase {
+public class SyslogAppender extends SyslogAppenderBase<LoggingEvent> {
 
   String prefixPattern;
   PatternLayout prefixLayout;
 
   static final public String DEFAULT_SUFFIX_PATTERN = "[%thread] %logger %msg";
 
-  public Layout buildLayout(String facilityStr) {
+  public Layout<LoggingEvent> buildLayout(String facilityStr) {
 
     prefixPattern = "%syslogStart{" + facilityStr + "}%nopex";
     prefixLayout = new PatternLayout();

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/BasicLoggerTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/BasicLoggerTest.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/BasicLoggerTest.java	Mon Jan  8 23:17:26 2007
@@ -13,6 +13,7 @@
 
 import org.slf4j.LoggerFactory;
 
+import ch.qos.logback.classic.spi.LoggingEvent;
 import ch.qos.logback.core.read.ListAppender;
 import ch.qos.logback.core.util.StatusPrinter;
 
@@ -20,7 +21,7 @@
 
   public void testBasic() {
     LoggerContext lc = new LoggerContext();
-    ListAppender listAppender = new ListAppender();
+    ListAppender<LoggingEvent> listAppender = new ListAppender<LoggingEvent>();
     listAppender.start();
     Logger root = lc.getLogger(LoggerContext.ROOT_NAME);
     root.addAppender(listAppender);
@@ -32,7 +33,7 @@
 
   public void testNoStart() {
     LoggerContext lc = new LoggerContext();
-    ListAppender listAppender = new ListAppender();
+    ListAppender<LoggingEvent> listAppender = new ListAppender<LoggingEvent>();
     // listAppender.start();
     listAppender.setContext(lc);
     Logger root = lc.getLogger(LoggerContext.ROOT_NAME);
@@ -44,7 +45,7 @@
 
   public void testAdditive() {
     LoggerContext lc = new LoggerContext();
-    ListAppender listAppender = new ListAppender();
+    ListAppender<LoggingEvent> listAppender = new ListAppender<LoggingEvent>();
     listAppender.start();
     Logger root = lc.getLogger(LoggerContext.ROOT_NAME);
     root.addAppender(listAppender);
@@ -68,7 +69,7 @@
   
   public void testBasicFiltering() throws Exception {
     LoggerContext lc = new LoggerContext();
-    ListAppender listAppender = new ListAppender();
+    ListAppender<LoggingEvent> listAppender = new ListAppender<LoggingEvent>();
     listAppender.start();
     Logger root = lc.getLogger(LoggerContext.ROOT_NAME);
     root.addAppender(listAppender);

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/HLogger.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/HLogger.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/HLogger.java	Mon Jan  8 23:17:26 2007
@@ -53,7 +53,7 @@
   /**
    * Array of appenders.
    */
-  private ArrayList appenderList;
+  private ArrayList<Appender<LoggingEvent>> appenderList;
 
   /**
    * Additivity is set to true by default, that is children inherit the
@@ -155,7 +155,7 @@
     if (appenderList != null) {
       int len = appenderList.size();
       for (int i = 0; i < len; i++) {
-        Appender a = (Appender) appenderList.get(i);
+        Appender a = appenderList.get(i);
         a.stop();
       }
       appenderList.clear();
@@ -195,12 +195,12 @@
 
   private int appendLoopOnAppenders(LoggingEvent event) {
     int size = 0;
-    Appender appender;
+    Appender<LoggingEvent> appender;
 
     if (appenderList != null) {
       size = appenderList.size();
       for (int i = 0; i < size; i++) {
-        appender = (Appender) appenderList.get(i);
+        appender = appenderList.get(i);
         appender.doAppend(event);
       }
     }

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/MessageFormattingTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/MessageFormattingTest.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/MessageFormattingTest.java	Mon Jan  8 23:17:26 2007
@@ -1,3 +1,12 @@
+/**
+ * Logback: the generic, reliable, fast and flexible logging framework.
+ * 
+ * Copyright (C) 1999-2007, QOS.ch
+ * 
+ * This library is free software, you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation.
+ */
 package ch.qos.logback.classic;
 
 import junit.framework.TestCase;
@@ -6,57 +15,56 @@
 
 public class MessageFormattingTest extends TestCase {
 
-	LoggerContext lc;
-	ListAppender listAppender;
-	
-	public void setUp() {
-		lc = new LoggerContext();
-		Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
-		listAppender = new ListAppender();
-		listAppender.setContext(lc);
-		listAppender.start();
-		logger.addAppender(listAppender);
-	}
-	
-	public void testFormattingOneArg() {
-		Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
-		logger.debug("{}", new Integer(12));
-		LoggingEvent event = (LoggingEvent)listAppender.list.get(0);
-		assertEquals("12", event.getFormattedMessage());
-	}
-	
-	public void testFormattingTwoArg() {
-		Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
-		logger.debug("{}-{}", new Integer(12), new Integer(13));
-		LoggingEvent event = (LoggingEvent)listAppender.list.get(0);
-		assertEquals("12-13", event.getFormattedMessage());
-	}
-	
-	public void testNoFormatting() {
-		Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
-		logger.debug("test", new Integer(12), new Integer(13));
-		LoggingEvent event = (LoggingEvent)listAppender.list.get(0);
-		assertEquals("test", event.getFormattedMessage());
-	}
-	
-	public void testNoFormatting2() {
-		Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
-		logger.debug("test");
-		LoggingEvent event = (LoggingEvent)listAppender.list.get(0);
-		assertEquals("test", event.getFormattedMessage());		
-	}
-	
-	public void testMessageConverter() {
-		Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
-		logger.debug("{}", 12);
-		LoggingEvent event = (LoggingEvent)listAppender.list.get(0);
-		PatternLayout layout =  new PatternLayout();
-		layout.setContext(lc);
-		layout.setPattern("%m");
-		layout.start();
-		String formattedMessage = layout.doLayout(event);
-		assertEquals("12", formattedMessage);	
-	}
-	
-	
+  LoggerContext lc;
+  ListAppender<LoggingEvent> listAppender;
+
+  public void setUp() {
+    lc = new LoggerContext();
+    Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
+    listAppender = new ListAppender<LoggingEvent>();
+    listAppender.setContext(lc);
+    listAppender.start();
+    logger.addAppender(listAppender);
+  }
+
+  public void testFormattingOneArg() {
+    Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
+    logger.debug("{}", new Integer(12));
+    LoggingEvent event = (LoggingEvent) listAppender.list.get(0);
+    assertEquals("12", event.getFormattedMessage());
+  }
+
+  public void testFormattingTwoArg() {
+    Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
+    logger.debug("{}-{}", new Integer(12), new Integer(13));
+    LoggingEvent event = (LoggingEvent) listAppender.list.get(0);
+    assertEquals("12-13", event.getFormattedMessage());
+  }
+
+  public void testNoFormatting() {
+    Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
+    logger.debug("test", new Integer(12), new Integer(13));
+    LoggingEvent event = (LoggingEvent) listAppender.list.get(0);
+    assertEquals("test", event.getFormattedMessage());
+  }
+
+  public void testNoFormatting2() {
+    Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
+    logger.debug("test");
+    LoggingEvent event = (LoggingEvent) listAppender.list.get(0);
+    assertEquals("test", event.getFormattedMessage());
+  }
+
+  public void testMessageConverter() {
+    Logger logger = lc.getLogger(LoggerContext.ROOT_NAME);
+    logger.debug("{}", 12);
+    LoggingEvent event = (LoggingEvent) listAppender.list.get(0);
+    PatternLayout layout = new PatternLayout();
+    layout.setContext(lc);
+    layout.setPattern("%m");
+    layout.start();
+    String formattedMessage = layout.doLayout(event);
+    assertEquals("12", formattedMessage);
+  }
+
 }

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java	Mon Jan  8 23:17:26 2007
@@ -47,7 +47,8 @@
         .getName(), logger, Level.INFO, "Some message", ex, null);
   }
 
-  public Object getEventObject() {
+  @Override
+  public LoggingEvent getEventObject() {
     return makeLoggingEvent(null);
   }
   

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/StringListAppender.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/StringListAppender.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/StringListAppender.java	Mon Jan  8 23:17:26 2007
@@ -7,9 +7,9 @@
 import ch.qos.logback.core.AppenderBase;
 import ch.qos.logback.core.Layout;
 
-public class StringListAppender extends AppenderBase {
+public class StringListAppender extends AppenderBase<LoggingEvent> {
 
-  Layout layout;
+  Layout<LoggingEvent> layout;
   public List<String> strList = new ArrayList<String>();
 
   public void start() {
@@ -26,17 +26,17 @@
   }
 
   @Override
-  protected void append(Object eventObject) {
+  protected void append(LoggingEvent eventObject) {
     LoggingEvent le = (LoggingEvent) eventObject;
     String res = layout.doLayout(le);
     strList.add(res);
   }
 
-  public Layout getLayout() {
+  public Layout<LoggingEvent> getLayout() {
     return layout;
   }
 
-  public void setLayout(Layout layout) {
+  public void setLayout(Layout<LoggingEvent> layout) {
     this.layout = layout;
 
   }

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/html/HTMLLayoutTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/html/HTMLLayoutTest.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/html/HTMLLayoutTest.java	Mon Jan  8 23:17:26 2007
@@ -33,7 +33,7 @@
     lc = new LoggerContext();
     lc.setName("default");
 
-    ListAppender appender = new ListAppender();
+    ListAppender<LoggingEvent> appender = new ListAppender<LoggingEvent>();
     appender.setContext(lc);
     layout = new HTMLLayout();
     layout.setThrowableRenderer(new DefaultThrowableRenderer());

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/BasicJoranTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/BasicJoranTest.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/BasicJoranTest.java	Mon Jan  8 23:17:26 2007
@@ -22,6 +22,7 @@
 import ch.qos.logback.classic.util.Constants;
 import ch.qos.logback.core.joran.spi.JoranException;
 import ch.qos.logback.core.read.ListAppender;
+import ch.qos.logback.core.util.StatusPrinter;
 
 public class BasicJoranTest extends TestCase {
 
@@ -73,6 +74,8 @@
     jc.setContext(loggerContext);
     jc.doConfigure(Constants.TEST_DIR_PREFIX + "input/joran/callerData.xml");
 
+    StatusPrinter.print(loggerContext);
+    
     Logger logger = loggerContext.getLogger(this.getClass().getName());
     String msg = "hello world";
     logger.debug("toto");

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppenderTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppenderTest.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppenderTest.java	Mon Jan  8 23:17:26 2007
@@ -86,7 +86,7 @@
     assertEquals(1, appender.getContext().getStatusManager().getCount());
   }
 
-  private static Layout buildLayout(LoggerContext lc) {
+  private static Layout<LoggingEvent> buildLayout(LoggerContext lc) {
     PatternLayout layout = new PatternLayout();
     layout.setContext(lc);
     layout.setFileHeader("Some header\n");

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppenderTestApp.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppenderTestApp.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppenderTestApp.java	Mon Jan  8 23:17:26 2007
@@ -6,6 +6,7 @@
 import ch.qos.logback.classic.LoggerContext;
 import ch.qos.logback.classic.MDC;
 import ch.qos.logback.classic.PatternLayout;
+import ch.qos.logback.classic.spi.LoggingEvent;
 import ch.qos.logback.core.Layout;
 import ch.qos.logback.core.util.StatusPrinter;
 
@@ -38,7 +39,7 @@
     StatusPrinter.print(lc.getStatusManager());
   }
 
-  private static Layout buildLayout(LoggerContext lc) {
+  private static Layout<LoggingEvent> buildLayout(LoggerContext lc) {
     PatternLayout layout = new PatternLayout();
     layout.setContext(lc);
     layout.setFileHeader("Some header\n");



More information about the logback-dev mailing list