Hi, I would like to propose an extension to Actuator. I think it could be useful for our issue VanRoy/spring-cloud-dashboard#19 to expose an endpoint that would allows us to retrieve the logs content from spring.logging.path or spring.logging.file. A WebSocket endpoint could also be implemented to provide real time streaming of theses logs. This would be a useful Ops feature for the Spring Cloud Dashboard project we are working on.
I will work on a separate project to implement this feature but I am wondering if it is something the community would like to merge into spring boot.
Have you seen issue #2137 and the LogFileMvcEndpoint that was introduced in PR #2294? It doesn't do websockets, but it should return file content.
That is just perfect ! I'll send a PR inspired by this contribution to expose a websocket endpoint for streaming. Thanks !
@daniellavoie FYI: with the next spring boot admin release (out short after boot 1.4.1), we add a tail -f style view for the logfile (using the Range header).
Additional to that in my opinion for this unidirectional communication server sent events are a better fit. Websockets adds extra complexity, SSE don't.
@joshiste I like that ! That would fit perfectly our requirements of Spring Cloud Dashboard forked from Spring Boot Admin. We'll rebase with your future release. Case closed. Many thanks everyone for the feedbacks ;)
@joshiste Got any reference to a Spring Boot Admin issue ?
@joshiste @daniellavoie It would be cool to tail -f in spring actuator as well. Any chance to patch here as well?
Most helpful comment
@joshiste @daniellavoie It would be cool to
tail -fin spring actuator as well. Any chance to patch here as well?