staticmdcbinder.java
来自「Java开发最新的日志记录工具slf4j的源码」· Java 代码 · 共 34 行
JAVA
34 行
package org.slf4j.impl;
import org.slf4j.spi.MDCAdapter;
/**
* This implementation is bound to {@link Log4jMDCAdapter}.
*
* @author Ceki Gülcü
*/
public class StaticMDCBinder {
/**
* The unique instance of this class.
*/
public static final StaticMDCBinder SINGLETON = new StaticMDCBinder();
private StaticMDCBinder() {
}
/**
* Currently this method always returns an instance of
* {@link StaticMDCBinder}.
*/
public MDCAdapter getMDCA() {
return new Log4jMDCAdapter();
}
public String getMDCAdapterClassStr() {
return Log4jMDCAdapter.class.getName();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?