【问题标题】:How can we connfigure log4j2 logs with spring boot actuator?我们如何使用 Spring Boot 执行器配置 log4j2 日志?
【发布时间】:2017-04-27 07:35:20
【问题描述】:

我想查看 log4j 登录浏览器链接。 我发现 spring boot 执行器提供了基于浏览器的日志端点,但我不确定如何使用 log4j 配置它。 是否有任何其他 API 可以集成到我的应用程序中以在浏览器中查看实时日志?

【问题讨论】:

    标签: spring spring-boot log4j log4j2 spring-boot-actuator


    【解决方案1】:

    一旦我如下更新 application.properties,它就对我有用。

    logging.file=logfile.log logging.path=/home/developer/logs

    查看文档:https://docs.spring.io/spring-boot/docs/2.0.5.RELEASE/reference/htmlsingle/#production-ready-logger-configuration

    它说:返回日志文件的内容(如果已设置 logging.file 或 logging.path 属性)。支持使用 HTTP Range 标头检索部分日志文件内容。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-20
      • 2014-10-30
      • 2019-03-26
      • 1970-01-01
      • 1970-01-01
      • 2017-09-07
      • 2019-11-14
      • 1970-01-01
      相关资源
      最近更新 更多