Hongcj925 2020-05-25 15:17 采纳率: 100%
浏览 2422
已采纳

spring boot admin 2.2.3 查看日志 报404

图片说明

我的版本是spirngboot admin 2.2.3,结合了eureka使用,

client的logback.xml里,日志路径为logs/output.log
图片说明

admin-server的配置:

spring:
  application:
    name: admin-server

server:
  port: 8080
eureka:
  client:
    registryFetchIntervalSeconds: 5
    service-url:
      defaultZone: http://localhost:8761/eureka/
  instance:
    leaseRenewalIntervalInSeconds: 10
    health-check-url-path: /actuator/health

admin-client的配置:

spring:
  application:
    name: admin-customer1
server:
  port: 8081
eureka:
  client:
    registryFetchIntervalSeconds: 5
    service-url:
      defaultZone: http://localhost:8761/eureka/
  instance:
    leaseRenewalIntervalInSeconds: 10
    health-check-url-path: /actuator/health

management:
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      show-details: ALWAYS

logging:
  file:
    path: logs/output.log
  pattern:
    file: "%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(${PID}){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wEx"

eureka-server的配置:

spring:
  application:
    name: eureka-server
server:
  port: 8761
eureka:
  client:
    service-url:
      defaultZone: http://localhost:8761/eureka
    register-with-eureka: false
    fetch-registry: false

请大佬们帮我看看,是哪里配置没配好,导致查看不了日志。其他监控信息都是能看到的。

  • 写回答

4条回答 默认 最新

  • weixin_43061875 2020-11-13 17:43
    关注

    file.name  不是 file.path

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 已采纳回答 2月29日