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/>
posted @ 2019-12-18 14:52  西山农夫  阅读(1101)  评论(0)    收藏  举报