@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
相关推荐
星晨雪海1 天前
企业标准 DTO 传参 + Controller + Service + 拷贝工具类完整版龙侠九重天1 天前
C# 机器学习数据处理IT 行者1 天前
Web逆向工程AI工具:JSHook MCP,80+专业工具让Claude变JS逆向大师程序员 沐阳1 天前
JavaScript 内存与引用:深究深浅拷贝、垃圾回收与 WeakMap/WeakSetpshdhx_albert1 天前
AI agent实现打字机效果Mr_Xuhhh1 天前
Java泛型进阶:从基础到高级特性完全指南沉鱼.441 天前
第十二届题目He1955011 天前
wordpress搭建块老天文学家了1 天前
蓝桥杯备战Python赫瑞1 天前
数据结构中的排列组合 —— Java实现