@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);
}
判断使用的日志框架
乱蜂朝王2023-12-30 17:15
相关推荐
小bo波3 小时前
Java Swing 图形用户界面实验 —— 从算术练习到游戏开发的完整实践咖啡八杯4 小时前
GoF设计模式——备忘录模式SamDeepThinking15 小时前
裁掉那个差程序员后,给你看团队里高手的代码:这个习惯,希望你有朕瞧着你甚好16 小时前
技术雷达 & Java 集成评估报告 — Apache Tika 3.3.1MacroZheng17 小时前
短短几天,暴涨2.8万Star!又一款编程神器开源!SamDeepThinking17 小时前
函数式编程:用BiFunction消除多类型分支的代码重复Flittly1 天前
【AgentScope Java新手村系列】(16)从RAG到多路检索小兔崽子去哪了1 天前
Java 生成二维码解决方案人活一口气2 天前
从JVM调优到MCP协议:Java全栈技术体系深度总结与企业级架构实践NE_STOP2 天前
Vibe Coding -- 完整项目案例实操