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

org.slf4j.impl.StaticMDCBinder Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package org.slf4j.impl;

import com.firefly.utils.ServiceUtils;
import org.slf4j.spi.MDCAdapter;

/**
 * @author Pengtao Qiu
 */
public class StaticMDCBinder {

    /**
     * The unique instance of this class.
     */
    public static final StaticMDCBinder SINGLETON = new StaticMDCBinder();
    private MDCAdapter mdca;

    private StaticMDCBinder() {
        mdca = ServiceUtils.loadService(org.slf4j.spi.MDCAdapter.class, new MDCAdapterImpl());
    }

    public MDCAdapter getMDCA() {
        return mdca;
    }

    public String getMDCAdapterClassStr() {
        return mdca.getClass().getName();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy