@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
相关推荐
Resean02235 小时前
Spring 源码分析(二)配置类的解析与扫描小毛球.5 小时前
第 3 篇:IDEA 最新版下载与完整安装教程(Mac)ShineWinsu5 小时前
对于Qt:QFormLayout常见属性以及方法的解析Misnearch6 小时前
ScheduledExecutorServiceashiho7 小时前
【LeetCode hot 100】3. 无重复字符的最长子串 (三种解法)T_Wizard8 小时前
AI 回复为什么要转圈 3 秒才「啪」一下全出来?把流式输出拆开看,顺便踩了 6 个坑CoderYanger8 小时前
Java EE 进阶:9.MyBatis 操作数据库(进阶)(第二弹)小满、10 小时前
Java 值传递IT枫斗者枫哥10 小时前
Java 异步导出只测最终行数,为什么下载时仍会少一行?张紫娃10 小时前
idea 如何看一个类的 .class 文件