java – How to show the contents of log file in browser screen using Spring Actuator?

java – How to show the contents of log file in browser screen using Spring Actuator?

You can use Spring Boot Admin: https://github.com/codecentric/spring-boot-admin

The logs appear like this:

enter

You can use https://start.spring.io/ to include de Admin Client and Server in your project. Check the tutorial here: http://codecentric.github.io/spring-boot-admin/current/#getting-started

By default, the following Spring Boot Actuator endpoints are enabled (JMX/WEB):

https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html#production-ready-endpoints-exposing-endpoints

To enable specific endpoints write the following in Spring Boot application.properties file:

management.endpoints.web.exposure.include = info, health, logfile

or to disable write:

management.endpoints.web.exposure.exclude = env,beans

java – How to show the contents of log file in browser screen using Spring Actuator?

Leave a Reply

Your email address will not be published. Required fields are marked *