Show Referer URL in logs?

When reviewing my logs, every so often I notice an exception where I
understand the problem but don’t know where the problem is arising.

Specifically, I can see the controller/action/params being called and
can identify the problem in the spelling or combination of paramaters.

What I don’t know is from what page is this being called from.
Sometimes it’s hard to guess where in the app this is being called from.

Logs don’t seem to show this. What I want to access is the
request.referer and add it to the log.

Can this be done? Am I missing something?

Thanks,

John

This plugin might solve your problem, and more:

http://svn.rubyonrails.org/rails/plugins/exception_notification

It sends an email to configurable email addresses (yours/your sys-
admin) when errors are raised.

The email contains all kinds of details about the request, including
the referr-url.

Or look at at log4r, and add the info you need to the log-messages.

Stephan

On Apr 12, 1:34 pm, John H. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs