views:

121

answers:

1

I have written a Ruby (not Rails) app which generates web pages. The script is installed on a linux web server and is called up by apache using CGI in response to HTTP requests. Pretty standard stuff.

When I am running it on my own computer I look at the apache error log to see the ruby error messages.

However, on the host that I use I have no access to the apache error_log. Therefore I am presently unable to see the error messages when my script hits a problem. Usually just a blank page or an apache error page.

I have ssh access to the host.

Is there a way to easily see the error messages and other log output?

+1  A: 

Multiple solutions here.

  1. Redirect logs to syslog (assuming you have access to it). Read more here

  2. Analyze Rails application logs (don't be confused by http logs in Apache) in your_app_dir/logs

Zepplock
Thankyou. My app is Ruby but not Rails however. In terms of redirecting logs, I tried the ErrorLog directive but apache wouldn't accept it, presumably it is a system setting. I am now thinking of making a wrapper script for the ruby executable to do the redirecting.
invariant
You should consider switching to Rails, you'll get a lot of functionality that you are looking for. Considering you are doing web development of course.
Zepplock