tail f to an element using ajax

hi all,

do you think it would be possible to tail -f the production log and update an html element using rjs

so that the web page is updated every time the production log is updated?

basically I want to see my logs on an admin web page so I don’t have to ssh into my server

dion

Dion Hewson wrote:

do you think it would be possible to tail -f the production log and update an html element using rjs

so that the web page is updated every time the production log is updated?

All you need is periodically_call_remote. Get googling!

basically I want to see my logs on an admin web page so I don't have to ssh into my server

I would only abuse Ajax for a paying customer. For myself, I would simply either nab one of several log-reading websites which I suspect are out there, or would dump the log into a <pre> tag and then hit refresh frequently - or automate the refresh with a META tag.

Is there some reason you need to watch your logs so often?

You could do something like this which I think is more secure… you are using Capistrano, right?

http://snippets.dzone.com/posts/show/2484

thats a neat trick…

but requires you to be on a development machine with capistrano

I want to be able to monitor my logs from any machine, with just the browser…

If you want a bit more flashy tailing of your logfiles, you could have a look at glTail from http://www.fudgie.org

We’re running it at work on a big monitor with great success.

– Erlend