01: package org.apache.log4j;
02:
03: public class MDC {
04:
05: public static void put(String key, String value) {
06: org.slf4j.MDC.put(key, value);
07: }
08:
09: public static void put(String key, Object value) {
10: if (value != null) {
11: put(key, value.toString());
12: } else {
13: put(key, null);
14: }
15: }
16:
17: public static Object get(String key) {
18: return org.slf4j.MDC.get(key);
19: }
20:
21: public static void remove(String key) {
22: org.slf4j.MDC.remove(key);
23: }
24:
25: public static void clear() {
26: org.slf4j.MDC.clear();
27: }
28: }
|