判断使用的日志框架

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

}

相关推荐
老华带你飞4 分钟前
健身房|基于springboot + vue健身房管理系统(源码+数据库+文档)
java·数据库·vue.js·spring boot·后端
JIngJaneIL8 分钟前
基于Java酒店预约系统(源码+数据库+文档)
java·开发语言·数据库·vue.js·spring boot
编程小Y26 分钟前
php.ini 的核心作用与全面解析
开发语言·php
曹牧32 分钟前
Java:List<Map<String, String>>转换为字符串
java·开发语言·windows
我是一棵无人问荆的小草39 分钟前
编码演变史
开发语言·c++
Unstoppable221 小时前
代码随想录算法训练营第 56 天 | 拓扑排序精讲、Dijkstra(朴素版)精讲
java·数据结构·算法·
偶像你挑的噻1 小时前
2.Qt-基础核心以及信号与槽
开发语言·qt
qinyia1 小时前
WisdomSSH解决docker run命令中log-opt参数不支持导致的容器创建失败问题
java·docker·eureka
potato_may2 小时前
CC++ 内存管理 —— 程序的“五脏六腑”在哪里?
c语言·开发语言·数据结构·c++·内存·内存管理
饕餮怪程序猿2 小时前
A*算法(C++实现)
开发语言·c++·算法