Display the contents of a log file as it is updated

前端 未结 2 1030
借酒劲吻你
借酒劲吻你 2020-11-27 04:13

I have external programs such as ffmpeg and gstreamer running in the background and writing to a log file. I want to display the contents of this log with my Flask applicat

2条回答
  •  野性不改
    2020-11-27 05:15

    I am using frontail package from npm.

    npm i frontail -g
    frontail /var/log/syslog
    

    visit http://127.0.0.1:9001 to view logs

    Source: https://github.com/mthenw/frontail

    This may not be the exact answer for the question(to embed an html page), but it solves the problem of many users who are looking specifically only for

    Display the contents of a log file as it is updated

提交回复
热议问题