@Test
public void testLoggerLoaction() {
String loggerBinderClassName = "org.slf4j.impl.StaticLoggerBinder";
Class<?> loggerBinderClass = null;
try {
loggerBinderClass = Class.forName(loggerBinderClassName);
} catch (ClassNotFoundException e) {
System.out.println(loggerBinderClassName + " is not found");
}
URL loaction = loggerBinderClass.getProtectionDomain().getCodeSource().getLocation();
System.out.println(loaction);
}
判断使用的日志框架
乱蜂朝王2023-12-30 17:15
相关推荐