判断使用的日志框架

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

}

相关推荐
t***54444 分钟前
Clang 编译器在 Orwell Dev-C++ 中的局限性
开发语言·c++
OtIo TALL1 小时前
redis7 for windows的安装教程
java
oy_mail1 小时前
QoS质量配置
开发语言·智能路由器·php
oyzz1201 小时前
PHP操作redis
开发语言·redis·php
uNke DEPH2 小时前
Spring Boot的项目结构
java·spring boot·后端
nashane2 小时前
HarmonyOS 6学习:网络能力变化监听与智能提示——告别流量偷跑,打造贴心网络感知应用
开发语言·php·harmony app
xixingzhe22 小时前
idea启动vue项目
java·vue.js·intellij-idea
wzl202612132 小时前
企业微信定时群发技术实现与实操指南(原生接口+工具落地)
java·运维·前端·企业微信
凌波粒2 小时前
Java 8 “新”特性详解:Lambda、函数式接口、Stream、Optional 与方法引用
java·开发语言·idea
曹牧2 小时前
Eclipse:悬停提示(Hover)
java·ide·eclipse