spring不使用日志框架为什么打印不了debug信息

2025-04-26 14:11:53

1、添加spring框架依赖

spring不使用日志框架为什么打印不了debug信息

2、启动一个测试类

spring不使用日志框架为什么打印不了debug信息

3、日志打印信息如下,没有框架内部的debug信息

spring不使用日志框架为什么打印不了debug信息

4、原因是因为JavaUtilLog的isDebugEnabled()方法永远返回false

spring不使用日志框架为什么打印不了debug信息

5、spring框架默认使用java.util.logging框架

spring不使用日志框架为什么打印不了debug信息
spring不使用日志框架为什么打印不了debug信息

6、而在spring内容使用很多debug日志信息打印

spring不使用日志框架为什么打印不了debug信息

7、可以选择log4j,logback框架集成,就可以打印内部的debug信息了

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢