jenkins ui如何显示日志文件?

问题描述 投票:1回答:1

目前我正在开发一个应用程序,通过spring-boot将文件内容(尤其是日志文件)暴露给由react驱动的Web应用程序。

我非常喜欢jenkins的日志视图,并问自己他们是如何处理这个问题的。不幸的是我在源代码中找不到日志查看器。

有人可以给我一个暗示他们如何在服务器和客户端更新文件或者只是给我他们的来源?

spring reactjs user-interface jenkins
1个回答
1
投票

Custom log view implementation might not be required

Spring boot有一个叫做执行器api的特殊端点

其中一个端点是:/ actuator / logfile,用于查看spring引导日志:

curl 'http://localhost:8080/actuator/logfile' -i -X GET

enter image description here


how they are updating the file on server and client side

  • 在服务器中更新日志文件不是我们的问题。
  • 我们关注的是网络中的一个很酷的观点。
  • 我使用了node.js实现。准备好了,你可以采取一些想法: https://github.com/mthenw/frontail
  • 我认为可能需要结合使用Web套接字,css和正确的文件流操作(打开,关闭)和内存管理来实现目标。
© www.soinside.com 2019 - 2024. All rights reserved.