判断使用的日志框架

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

}

相关推荐
骄马之死3 小时前
SpringMVC + SpringBoot 核心知识点总结
java·spring boot·后端
z落落4 小时前
C# 泛型方法(原理、类型推断、多泛型参数)+泛型效率(普通类型 VS Object装箱 VS 泛型)
开发语言·c#
L_09074 小时前
【C++】异常
开发语言·c++
世辰辰辰5 小时前
批量修改图片/文本名子
开发语言·python·批量修改文件名
郑洁文5 小时前
基于Spring Boot的流浪动物救助网站
java·spring boot·后端·毕设·流浪动物救助
螺丝钉code6 小时前
JAVA项目 Claude code CLAUDE.md 到底应该怎么写
java·人工智能·claude code
z落落7 小时前
C# 四种特殊类:抽象类、密封类、静态类、部分类
开发语言·c#
摇滚侠7 小时前
Maven 入门+高深 单一架构案例 54-59
java·架构·maven·intellij-idea
VidDown7 小时前
Webhook 调试器:让第三方回调“原形毕露”
java·开发语言·javascript·编辑器·postman
折哥的程序人生 · 物流技术专研7 小时前
Java 23 种设计模式:从踩坑到精通 | 原型模式 —— 克隆对象,深拷贝与浅拷贝的坑你踩过吗?
java·设计模式·架构·原型模式·单一职责原则