- update to logj dependency to 1.2.14

- renamed getCopyOfPropertyMap to getCopyOfContextMap in MDCAdapter and co.
This commit is contained in:
Ceki Gulcu 2008-05-27 18:39:57 +00:00
parent 9147020c62
commit d75c396661
7 changed files with 24 additions and 9 deletions

View File

@ -58,7 +58,7 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.13</version>
<version>1.2.14</version>
</dependency>
</dependencies>

View File

@ -168,12 +168,12 @@ public class MDC {
* @return A copy of the current thread's context map. May be null.
* @since 1.5.1
*/
public static Map getCopyOfPropertyMap() {
public static Map getCopyOfContextMap() {
if (mdcAdapter == null) {
throw new IllegalStateException("MDCAdapter cannot be null. See also "
+ NULL_MDCA_URL);
}
return mdcAdapter.getCopyOfPropertyMap();
return mdcAdapter.getCopyOfContextMap();
}
/**

View File

@ -122,7 +122,7 @@ public class BasicMDCAdapter implements MDCAdapter {
* Returned value may be null.
*
*/
public Map getCopyOfPropertyMap() {
public Map getCopyOfContextMap() {
HashMap hashMap = (HashMap) inheritableThreadLocal.get();
if (hashMap != null) {
return new HashMap(hashMap);

View File

@ -28,7 +28,7 @@ public class NOPMakerAdapter implements MDCAdapter {
public void remove(String key) {
}
public Map getCopyOfPropertyMap() {
public Map getCopyOfContextMap() {
return null;
}

View File

@ -76,5 +76,5 @@ public interface MDCAdapter {
* @return A copy of the current thread's context map. May be null.
* @since 1.5.1
*/
public Map getCopyOfPropertyMap();
public Map getCopyOfContextMap();
}

View File

@ -38,7 +38,7 @@ public class Log4jMDCAdapter implements MDCAdapter {
org.apache.log4j.MDC.remove(key);
}
public Map getCopyOfPropertyMap() {
public Map getCopyOfContextMap() {
Map old = org.apache.log4j.MDC.getContext();
if(old != null) {
return new HashMap(old);

View File

@ -41,8 +41,23 @@ prefix='';
<code>Log4jLoggerAdapter</code> will map the TRACE level as DEBUG.
</p>
<p>The <a href="migrator.html">SLF4J Migrator</a> tool has been
improved to support migration from JUL to SLF4J.
<p>Added the <code>getCopyOfContextMap</code> method to the
<code>MDCAdapter</code> and <code>org.sf4j.MDC</code> classes. This
was requested in <a
href="http://bugzilla.slf4j.org/show_bug.cgi?id=84">bug 84</a> by
Anton Tagunov.
</p>
<p>Added the <code>getEffectiveLevel()</code> method to the
<code>Category</code> class in log4j-over-slf4j. This addition was
requested in <a
href="http://bugzilla.slf4j.org/show_bug.cgi?id=74">bug 74</a> by
Michael Newcomb.
</p>
<p>The <a href="migrator.html">SLF4J Migrator</a>
tool has been improved to support migration from JUL to SLF4J.
</p>
<p>In <code>MarkerIgnoringBase</code> class, corrected mapping of