@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
相关推荐
方也_arkling7 小时前
【Java-Day08】static / final / 枚举橙淮7 小时前
Spring Bean作用域与生命周期全解析风吹夏回7 小时前
Python 全局异常处理:从“满屏 try-except”到优雅兜底Chengbei117 小时前
一站式源码安全检测工具、云安全 / APP / 小程序源码敏感信息递归多层目录扫描AK、JWT、手机号、身份证等敏感信息llz_1127 小时前
web-第一次课后作业小熊Coding7 小时前
Python爬取当当网二手图书项目实战!秋97 小时前
Java项目运行5天左右自动宕机:系统性定位与解决方案小江的记录本7 小时前
【JVM虚拟机】垃圾回收GC:垃圾收集器:CMS:核心原理、回收流程、优缺点、废弃原因(附《思维导图》+《面试高频考点清单》)xiaoshuaishuai88 小时前
C# 内存管理与资源泄漏DIY源码阁8 小时前
JavaSwing学生成绩管理系统 - MySQL版