KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > log4j > MDC


1 package org.apache.log4j;
2
3 public class MDC {
4
5   public static void put(String JavaDoc key, String JavaDoc value) {
6     org.slf4j.MDC.put(key, value);
7   }
8   
9   public static void put(String JavaDoc key, Object JavaDoc value) {
10     if (value != null) {
11       put(key, value.toString());
12     } else {
13       put(key, null);
14     }
15   }
16   
17   public static Object JavaDoc get(String JavaDoc key) {
18     return org.slf4j.MDC.get(key);
19   }
20   
21   public static void remove(String JavaDoc key) {
22     org.slf4j.MDC.remove(key);
23   }
24   
25   public static void clear() {
26     org.slf4j.MDC.clear();
27   }
28 }
29
Popular Tags