介绍 | Logback是由log4j创始人设计的另一个开源日志组件,本文介绍日志配置文件存放位置,日志配置文件加载过程 | |
参考 | logback的使用和logback.xml详解:来自 <https://blog.csdn.net/lhl1124281072/article/details/79852582> 解决 logback.xml 配置不起作用的问题: 来自 <https://blog.csdn.net/cnwyt/article/details/80462896> logback: http://logback.qos.ch/manual/configuration.html#auto_configuration | |
| logback配置加载过程:
| |
| Class path:
| |
查看classpath | 查看classpath code接口:
| |
| 1.src\main\resources 目录下没有logback.xml文件,或者配置文件存放在resources子目录下,启动程序,未找到配置文件,logback使用组件默认的日志配置
| |
| 2.把logback .xml文件放置在resource目录下,src\main\resources\logback.xml,找到了 配置文件logback.xml
| |
小结 |
|
Logback日志组件的配置文件的存放位置及加载
最新推荐文章于 2024-08-19 19:33:51 发布