判断使用的日志框架

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

}

相关推荐
zhiSiBuYu051713 小时前
重排序(Rerank)提升检索准确率实战指南
开发语言·python·算法
SeeYa-J13 小时前
Sprint 1-2:创建第一个 Spring Boot Module(user-service)
java·spring boot·sprint
c++之路14 小时前
C++跨平台(九):跨平台字节序统一处理
开发语言·arm开发·c++
Evand J14 小时前
【MATLAB例程|车联网6】考虑调头车流扰动与网联车辆实时感知信息的干线多交叉口 FAC-CV 全感应协调控制仿真与性能对比分析
开发语言·matlab·仿真·代码·车联网·智慧交通·车辆
云絮.14 小时前
数据库事务
java·开发语言·数据库
格子软件14 小时前
2026年GEO优化系统源码级状态机与多模型调度拆解
java·前端·vue.js·人工智能·vue·geo
派葛穆14 小时前
Python-pip切换镜像源
开发语言·python·pip
Full Stack Developme14 小时前
Java 漏斗算法 及应用场景
java·开发语言·算法