asfcm
asfcm

Reputation: 43

Tailon (python web app with tail -f functionality): download full log

I've just implemented Tailon, a python web app, to create a webpage that provides tail -f functionality for a log file. Tailon provides file download functionality by using the -a optional argument (e.g. tailon -f log.file -b address:port -a), however the file presented for download is not the full log file, but rather the log file from the systems most recent start-up to present time.

I would like to know if there's a way to download the ENTIRE log file (I know there is more information in the log file than is being presented as I can view the entire log file via the command line). Does anyone have any experience with Tailon and the file download functionality? Is it possible to configure the web app to download the entire log file being viewed or is this functionality not currently implemented?

Upvotes: 1

Views: 641

Answers (1)

gvalkov
gvalkov

Reputation: 4097

Author of tailon here. This is certainly very strange as the fetch functionality is pretty straightforward. All in all, it just reads the whole file (didn't have time to implement proper streaming) and sends it to the client:

with open(path) as fh:
    self.write(fh.read())

This works fine for me:

tailon -f /path/to/log.file -b localhost:8080 -a
curl http://localhost:8080/fetch//path/to/log.file

Don't hesitate to log an issue if the problem persists and you think it's related to tailon. Thanks.

Upvotes: 1

Related Questions