执行器 - 可以自定义日志文件端点吗? [英] Actuator - custom logfile endpoint possible?

查看:76
本文介绍了执行器 - 可以自定义日志文件端点吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用logback设置了日志配置.

I have set up my log configuration using logback.

该配置在自定义位置以滚动方式设置我的日志.这意味着我没有使用任何一个:

The configuration sets up my logs in a rolling manner in a custom location. This means that I'm not using either:

我的 application.yml 配置中的logging.file"或logging.path",因此,日志文件端点不再有效.

"logging.file" or "logging.path" in my application.yml configuration, and as a consequence, the logfile endpoint no longer works.

有人知道一种自定义此终结点的方法,以便可以指向我的logback.xml配置中指定的位置/文件吗?

Does anybody know of a way to customize this endpoint, so that I can point to the location/file specified in my logback.xml configuration?

推荐答案

阅读有关记录日志的两个部分 74 .似乎建议将logback-spring.xml配置文件与base.xml配置一起使用.这样,您仍然可以在配置中使用logging.file或logging.path应用程序属性.这样,/logfile 端点对于当前日志文件仍然有效(如果您设置的是此文件,则可能不会查看滚动文件).

Reading the two sections on Logging 26 & 74. It looks like it recommends using the logback-spring.xml config file with the base.xml configuration. With that you can still use the logging.file or logging.path application properties within the configuration. That way the /logfile endpoint is still valid for the current log file (probably won't look into the rolling files if that is what you setup).

这篇关于执行器 - 可以自定义日志文件端点吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆