java - 为什么springboot启动时会清除旧的日志配置
问题描述
有一个遗留应用程序使用 JUL 并通过代码注册处理程序。现在我在旧版应用程序中使用 springboot。
我尝试了最小的spring boot依赖,它只包括spring-boot-starter,不包括spring-boot-starter-logging;在 application.properties 中将 org.springframework.boot.logging.LoggingSystem 设置为 none;使用 commons-logging 或 jcl-over-slf4j。并且 JUL 配置总是在 spring boot 启动时被清除。
有没有办法在 spring boot 启动时保持 JUL 配置不变?
spring boot 版本为 1.5.20,因为 legacy app 是用 java7 编译的
解决方案
this link partially answers the question
However, still not sure the mechanism of Logger initialization of Spring Boot
推荐阅读
- android - 为什么 Chrome 不再从通用链接打开相关应用程序?
- unit-testing - Spock:如何让不在被测类中的静态方法返回某个值?
- java - 如何删除类的arraylist中的重复项
- excel - 为什么我的 VBA 代码没有迭代到下一个 i?
- google-chrome - 在触摸栏中显示带有 favicon 的 Chrome 选项卡列表
- javascript - 如果状态没有改变,为什么 useEffect 不调用回调函数?
- ios - 如何在不将私有标头包含到框架中的情况下创建私有模块?
- r - PDF:表格提取 - Tabulizer (R)
- python - 相当于 cuDF 中的 pd.Series.str.slice() 和 pd.Series.apply()
- excel - 从 Excel VBA 中的对象调用模块时如何传递参数