@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
相关推荐
SamDeepThinking7 分钟前
高并发场景下,CompletableFuture与ForkJoinPool该如何取舍?张不才3 小时前
CPU 100% 了怎么办?Java 性能排障的标准化操作shepherd1114 小时前
吞吐量提升 10 倍:高并发大批量数据处理任务的架构演进与性能调优plainGeekDev7 小时前
单例模式 → object 声明用户298698530148 小时前
Java 实现 Word 文档文本与图片提取的方法SimonKing9 小时前
铁子,IntelliJ IDEA 2026.1.3来了,升不升?咖啡八杯20 小时前
GoF设计模式——策略模式用户128526116021 天前
我把祖传Java项目重构后,接口响应从3s砍到了200ms,只改了这几行代码Linsk1 天前
组件 = 模板 + 业务逻辑