Spring boot view Logs using RestController

Viewed 72

I am using Spring boot with an embedded tomcat that has the access to read log file, as the application is the one creating/writing to the log file.

Can we provide a logging controller , like a rest endpoint that would open the log file in the browser ?

For example : given an endpoint /info/log/file , the browser displays the latest log file generated on deployed spring-boot application

Ideally we should use tools like ELK, however currently ELK is not available so for debugging we need to Look at logs in higher env.

0 Answers
Related