Actuator - custom logfile endpoint possible?

╄→гoц情女王★ 提交于 2019-12-11 14:39:09

问题


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:

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

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?


回答1:


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).



来源:https://stackoverflow.com/questions/39587818/actuator-custom-logfile-endpoint-possible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!