spring-cloud-alibaba
spring-cloud-alibaba copied to clipboard
nacos配置变更导致logback日志格式变化
Version:spring-boot.version:2.5.7 spring-cloud.version:2020.0.4 spring-cloud-starter-alibaba-nacos-config:2.2.0.RELEASE
issue detail: 服务启动的之后的日志格式是符合预期的,但是当nacos配置更新的时候会导致我正在运行的服务logback.xml失效,导致日志格式变成了logback默认的。看了下源码发现nacos配置更新的时候会触发服务PropertySourceBootstrapConfiguration的initialize方法,而在这个方法中会重新初始化日志系统,由于我的日志配置是放在applicaiton.properties中的从而导致我自定义的logback.xml失效。想问一下这个是nacos设计之初故意这样设计的还是没考虑到的问题。
Hello, I have reproduced a method of customizing logback through thread context here Can you please reproduce the usage scenario based on this demo?
This scenario only appears when the nacos configuration changes.and I can share you my demo url.
iguration changes.and I can share you my demo url.
Can you share it ?
Long time without response and close first.