@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
相关推荐
金銀銅鐵10 小时前
带您看懂字节码指令(番外二):递归里有什么——三层 fact 帧怎么叠起来两点王爷12 小时前
Java 面试高频:JWT、Cookie、Session、Token 鉴权详解微笑星河q13 小时前
C++高阶之【多态】悟道书生13 小时前
hashMap/hashSet/hashCode详解nice_lcj52015 小时前
依赖注入的三种方式:构造器、Setter、字段怎么选噢,我明白了15 小时前
实际项目导出方式应用جيون داد ناالام ميづ16 小时前
七、MyBatis 源码剖析:核心流程拆解(初始化 + SQL 执行)ClkLog-开源埋点用户分析16 小时前
【产品说明】【埋点分析】ClkLog 商业版 Java 运行环境安全更新说明秋饼17 小时前
Spring Framework 7 内置弹性实战:@Retryable 语义翻转、虚拟线程流量放大与 LLM 网关治理