That's possible, but possibly quite impractical if the logs are filling rapidly. This would require
- a script that keeps track of a log file.
- It could check if the file has changed after the last check and possibly how much it has increased.
- Then it should get the data from the end of the file: the increased bytes or sufficient amount of lines to compare what's new. That depends on whether it's ok to skip some lines here and there or not, and might be a lot trickier than just
tail -f
.
- A constantly running
tail -f
might be a source for the script, but that might be a bad design: the buffer might get huge, or be flushed by other users.
- The script would output the file in e.g. JSON format.
- a JavaScript that
- calls the previous script regularly and
- adds the new lines into an element on the web page.
- Possibly adding the lines above the previous lines would be better suitable for web?
There might be such work or part of it done, if you Google for log
, tail
& AJAX
. I don't know of the quality of those projects, and most seem quite old and unmanaged.