判断使用的日志框架

@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);

}

相关推荐
星晨雪海16 小时前
企业标准 DTO 传参 + Controller + Service + 拷贝工具类完整版
java·开发语言·python
龙侠九重天16 小时前
C# 机器学习数据处理
开发语言·人工智能·机器学习·ai·c#
IT 行者1 天前
Web逆向工程AI工具:JSHook MCP,80+专业工具让Claude变JS逆向大师
开发语言·javascript·ecmascript·逆向
程序员 沐阳1 天前
JavaScript 内存与引用:深究深浅拷贝、垃圾回收与 WeakMap/WeakSet
开发语言·javascript·ecmascript
pshdhx_albert1 天前
AI agent实现打字机效果
java·http·ai编程
Mr_Xuhhh1 天前
Java泛型进阶:从基础到高级特性完全指南
开发语言·windows·python
沉鱼.441 天前
第十二届题目
java·前端·算法
He1955011 天前
wordpress搭建块
开发语言·wordpress·古腾堡·wordpress块
老天文学家了1 天前
蓝桥杯备战Python
开发语言·python
赫瑞1 天前
数据结构中的排列组合 —— Java实现
java·开发语言·数据结构