springcloud admin 展示日志


1、application.yml中增加配置

management:
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      show-details: ALWAYS
logging:
  file: 日志存放路径,如:/opt/log/xxx.log (和生产同步)
  

2、build.gradle增加jar引用

compile('org.springframework.boot:spring-boot-starter-actuator')
compile group: 'org.jolokia', name: 'jolokia-core', version: '1.6.0'
compile('de.codecentric:spring-boot-admin-starter-client:2.0.2')

3、logback.xml中增加代码

<include resource="org/springframework/boot/logging/logback/base.xml"/><jmxConfigurator/>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM