我也写了一个org.slf4j.impl.StaticMDCBinder,但是总是logback优先加载的StaticMDCBinder。
如何优雅地确定我的 org.slf4j.impl.StaticMDCBinder 的优先级;
package org.slf4j.impl;
import cn.jugg.agile.core.dapper.log.JaMDCAdapter;
import org.slf4j.spi.MDCAdapter;
// my StaticMDCBinder
public class StaticMDCBinder {
private static final StaticMDCBinder instance = new StaticMDCBinder();
private StaticMDCBinder() {
}
public static StaticMDCBinder getSingleton() {
return instance;
}
public MDCAdapter getMDCA() {
return new JaMDCAdapter();
}
}