[LOGBack-dev] svn commit: r267 - logback/core/trunk/src/main/java/ch/qos/logback/core

noreply.seb at qos.ch noreply.seb at qos.ch
Tue Jul 25 10:36:53 CEST 2006


Author: seb
Date: Tue Jul 25 10:36:52 2006
New Revision: 267

Modified:
   logback/core/trunk/src/main/java/ch/qos/logback/core/ContextBase.java
Log:
contexts have names

Modified: logback/core/trunk/src/main/java/ch/qos/logback/core/ContextBase.java
==============================================================================
--- logback/core/trunk/src/main/java/ch/qos/logback/core/ContextBase.java	(original)
+++ logback/core/trunk/src/main/java/ch/qos/logback/core/ContextBase.java	Tue Jul 25 10:36:52 2006
@@ -19,6 +19,7 @@
 
 public class ContextBase implements Context {
 
+	private String name;
   StatusManager sm = new BasicStatusManager();
   Map propertyMap = new HashMap();
   Map objectMap = new HashMap();
@@ -68,4 +69,15 @@
   public int getFilterChainDecision(Object event) {
     return fai.getFilterChainDecision(event);
   }
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		if(this.name != null) {
+			throw new IllegalStateException("Context has been already given a name");
+		}
+		this.name = name;
+	}
 }



More information about the logback-dev mailing list