You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-cvs@jakarta.apache.org by ce...@apache.org on 2001/10/21 16:06:44 UTC
cvs commit: jakarta-log4j/src/java/org/apache/log4j MDC.java
ceki 01/10/21 07:06:44
Modified: build build.xml
src/java/org/apache/log4j MDC.java
Log:
Added the remove method to MDC.
Alpha builds will be numbered alpha-build1, alpha-build2, instead of alpha1, alpha2 etc.
Revision Changes Path
1.55 +1 -1 jakarta-log4j/build/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-log4j/build/build.xml,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- build.xml 2001/10/17 06:37:29 1.54
+++ build.xml 2001/10/21 14:06:44 1.55
@@ -9,7 +9,7 @@
<!-- ================================================================= -->
<project name="log4j" default="usage" basedir=".." >
- <property name="version" value="1.2alpha2"/>
+ <property name="version" value="1.2alpha-b4"/>
<!-- The base directory relative to which most targets are built -->
<property name="base" value="."/>
1.10 +23 -0 jakarta-log4j/src/java/org/apache/log4j/MDC.java
Index: MDC.java
===================================================================
RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/MDC.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- MDC.java 2001/09/06 22:40:39 1.9
+++ MDC.java 2001/10/21 14:06:44 1.10
@@ -76,6 +76,18 @@
}
/**
+ Remove the the context identified by the <code>key</code>
+ parameter.
+
+ */
+ static
+ public
+ void remove(String key) {
+ mdc.remove0(key);
+ }
+
+
+ /**
Get the current thread's MDC as a hashtable.
*/
public
@@ -112,6 +124,17 @@
}
}
}
+
+ private
+ void remove0(String key) {
+ if(!java1) {
+ Hashtable ht = (Hashtable) ((ThreadLocalMap)tlm).get();
+ if(ht != null) {
+ ht.remove(key);
+ }
+ }
+ }
+
private
Hashtable getContext0() {
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-cvs-help@jakarta.apache.org