[logback-dev] svn commit: r783 - in logback/trunk: logback-access/src/main/java/ch/qos/logback/access/tomcat logback-core/src/main/java/ch/qos/logback/core logback-core/src/main/java/ch/qos/logback/core/joran/action logback-core/src/main/java/ch/qos/logback/core/pattern

noreply.seb at qos.ch noreply.seb at qos.ch
Thu Oct 26 14:28:09 CEST 2006


Author: seb
Date: Thu Oct 26 14:28:08 2006
New Revision: 783

Modified:
   logback/trunk/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Context.java
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/ContextBase.java
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/ConversionRuleAction.java
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java

Log:
Suppressed converterMap from context, using the object list instead.

Modified: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java
==============================================================================
--- logback/trunk/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java	(original)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java	Thu Oct 26 14:28:08 2006
@@ -87,7 +87,6 @@
   // serialized. For the time being, we ignore this shortcoming.
   Map<String, String> propertyMap = new HashMap<String, String>();
   Map<String, Object> objectMap = new HashMap<String, Object>();
-  Map<String, String> converterMap = new HashMap<String, String>();
   private FilterAttachableImpl fai = new FilterAttachableImpl();
 
   AppenderAttachableImpl aai = new AppenderAttachableImpl();
@@ -199,10 +198,6 @@
     objectMap.put(key, value);
   }
 
-  public Map<String, String> getConverterMap() {
-    return converterMap;
-  }
-
   public void addFilter(Filter newFilter) {
     fai.addFilter(newFilter);
   }

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Context.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Context.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Context.java	Thu Oct 26 14:28:08 2006
@@ -54,13 +54,6 @@
    */
   public void setProperty(String key, String value);
   
- 
-  /**
-   * LB contexts have a notion of context-specific converter maps.
-   * @return
-   */
-  public Map<String, String> getConverterMap();
-  
   /**
    * Contexts are named objects.
    * 

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/ContextBase.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/ContextBase.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/ContextBase.java	Thu Oct 26 14:28:08 2006
@@ -25,7 +25,6 @@
   // serialized. For the time being, we ignore this shortcoming.
   Map<String, String> propertyMap = new HashMap<String, String>();
   Map<String, Object> objectMap = new HashMap<String, Object>();
-  Map<String, String> converterMap = new HashMap<String, String>();
   private FilterAttachableImpl fai = new FilterAttachableImpl();
 
   public StatusManager getStatusManager() {
@@ -52,10 +51,6 @@
     objectMap.put(key, value);
   }
 
-  public Map<String, String> getConverterMap() {
-    return converterMap;
-  }
-
   public void addFilter(Filter newFilter) {
     fai.addFilter(newFilter);
   }

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/ConversionRuleAction.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/ConversionRuleAction.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/ConversionRuleAction.java	Thu Oct 26 14:28:08 2006
@@ -67,7 +67,7 @@
       }
       // put the new rule into the rule registry
       ruleRegistry.put(conversionWord, converterClass);
-  
+      
     } catch (Exception oops) {
       inError = true;
       errorMsg = "Could not add conversion rule to PatternLayout.";

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java	Thu Oct 26 14:28:08 2006
@@ -13,6 +13,7 @@
 import java.util.Map;
 
 import ch.qos.logback.core.Context;
+import ch.qos.logback.core.CoreGlobal;
 import ch.qos.logback.core.LayoutBase;
 import ch.qos.logback.core.pattern.parser.Node;
 import ch.qos.logback.core.pattern.parser.Parser;
@@ -55,7 +56,7 @@
     // contextMap is more specific than the default map
     Context context = getContext();
     if (context != null) {
-      Map<String, String> contextMap = context.getConverterMap();
+      Map<String, String> contextMap = (Map) context.getObject(CoreGlobal.PATTERN_RULE_REGISTRY);
       if (contextMap != null) {
         effectiveMap.putAll(contextMap);
       }



More information about the logback-dev mailing list