All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.log4j.MDC Maven / Gradle / Ivy

There is a newer version: 1.3.1.Final
Show newest version
package org.apache.log4j;

import java.util.Hashtable;

public class MDC {

    static final MDC mdc = new MDC();

    // preserve fields as closely as possible
    static final int HT_SIZE = 7;
    boolean java1 = false;
    Object tlm = new Object();

    public static void put(String key, Object o) {
        org.jboss.logmanager.MDC.put(key, o == null ? null : o.toString());
    }

    public static Object get(String key) {
        return org.jboss.logmanager.MDC.get(key);
    }

    public static void remove(String key) {
        org.jboss.logmanager.MDC.remove(key);
    }

    @SuppressWarnings("unchecked")
    public static Hashtable getContext() {
        return new Hashtable(org.jboss.logmanager.MDC.copy());
    }

    public static void clear() {
        org.jboss.logmanager.MDC.clear();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy