[logback-dev] svn commit: r1847 - logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net

noreply.ceki at qos.ch noreply.ceki at qos.ch
Sat Oct 18 21:31:15 CEST 2008


Author: ceki
Date: Sat Oct 18 21:31:14 2008
New Revision: 1847

Modified:
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SyslogAppender.java

Log:
The prefixPattern variable is internal to the buildLayout() method.

This change is related to LBCORE-52.



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	Sat Oct 18 21:31:14 2008
@@ -31,15 +31,13 @@
  */
 public class SyslogAppender extends SyslogAppenderBase<LoggingEvent> {
 
-  String prefixPattern;
-  PatternLayout prefixLayout;
-
   static final public String DEFAULT_SUFFIX_PATTERN = "[%thread] %logger %msg";
 
-  public Layout<LoggingEvent> buildLayout(String facilityStr) {
+  PatternLayout prefixLayout = new PatternLayout();
 
-    prefixPattern = "%syslogStart{" + facilityStr + "}%nopex";
-    prefixLayout = new PatternLayout();
+  public Layout<LoggingEvent> buildLayout(String facilityStr) {
+    String prefixPattern = "%syslogStart{" + facilityStr + "}%nopex";
+  
     prefixLayout.getInstanceConverterMap().put("syslogStart",
         SyslogStartConverter.class.getName());
     prefixLayout.setPattern(prefixPattern);


More information about the logback-dev mailing list