目前我正在开发一个应用程序,通过spring-boot将文件内容(尤其是日志文件)暴露给由react驱动的Web应用程序。
我非常喜欢jenkins的日志视图,并问自己他们是如何处理这个问题的。不幸的是我在源代码中找不到日志查看器。
有人可以给我一个暗示他们如何在服务器和客户端更新文件或者只是给我他们的来源?
Spring boot有一个叫做执行器api的特殊端点
其中一个端点是:/ actuator / logfile,用于查看spring引导日志:
curl 'http://localhost:8080/actuator/logfile' -i -X GET