[logback-dev] svn commit: r624 - logback/trunk/logback-access/src/main/java/ch/qos/logback/access

noreply.seb at qos.ch noreply.seb at qos.ch
Thu Oct 5 10:19:14 CEST 2006


Author: seb
Date: Thu Oct  5 10:19:13 2006
New Revision: 624

Modified:
   logback/trunk/logback-access/src/main/java/ch/qos/logback/access/PatternLayout.java

Log:
- added a line separator word, for more coherence with c.q.l.classic.PatternLayout
- modified the behaviour of postCompileProcessing() accordingly

Modified: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/PatternLayout.java
==============================================================================
--- logback/trunk/logback-access/src/main/java/ch/qos/logback/access/PatternLayout.java	(original)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/PatternLayout.java	Thu Oct  5 10:19:13 2006
@@ -18,7 +18,6 @@
 import ch.qos.logback.access.pattern.LocalIPAddressConverter;
 import ch.qos.logback.access.pattern.LocalPortConverter;
 import ch.qos.logback.access.pattern.NAConverter;
-import ch.qos.logback.access.pattern.PostContentConverter;
 import ch.qos.logback.access.pattern.RemoteHostConverter;
 import ch.qos.logback.access.pattern.RemoteIPAddressConverter;
 import ch.qos.logback.access.pattern.RemoteUserConverter;
@@ -93,6 +92,9 @@
     defaultConverterMap.put("reqCookie", RequestCookieConverter.class.getName());
     defaultConverterMap.put("responseHeader", ResponseHeaderConverter.class.getName());
     defaultConverterMap.put("reqParameter", RequestParameterConverter.class.getName());
+    
+    
+    defaultConverterMap.put("n", LineSeparatorConverter.class.getName());
   }
   
   public PatternLayout() {
@@ -116,7 +118,9 @@
     if(tail == null) {
       head = newLineConverter;
     } else {
-      tail.setNext(newLineConverter);
+      if (!(tail instanceof LineSeparatorConverter)) {
+        tail.setNext(newLineConverter);
+      }
     }
     setContextForConverters(head);
   }



More information about the logback-dev mailing list