Forum: Ruby on Rails Filtering what's logged

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B06f6479558ba7218963e93797d2f928?d=identicon&s=25 Ben Knight (biguniverse)
on 2009-01-23 22:17
We are currently using "rescue_action_in_public" in application.rb to
catch exceptions and send us alert emails.  However, we have recently
begun getting thousands of invalid requests with weird and very long
URLS.  My guess is that it is Windows viruses that the user isn't even
aware of since they are mainly coming from Windows machines and lots of
different IP addresses. Our problem is the at it's clogging up our log
files and I think these are innocent (but annoying) enough to ignore.

What's the cleanest way to detect an invalid exception based on the URL
and not have it logged?

Is "log_error(exc)" the best way?

Thanks in advance.
2505b282d57c29be797dc35b245adb4c?d=identicon&s=25 Philip Hallstrom (Guest)
on 2009-01-23 23:06
(Received via mailing list)
> URL
> and not have it logged?

Not a direct answer to your question, but you may consider switching
your setup to use hoptoad and then if they haven't already integrated
my patch to ignore certain user agents, patch it do to so.  Or just
look at my patch and adjust it to fit your scenario.

http://hoptoadapp.com/welcome
http://pjkh.com/articles/2009/01/06/rails-exceptio...

No affiliation, just like their service...

-philip
B06f6479558ba7218963e93797d2f928?d=identicon&s=25 Ben Knight (biguniverse)
on 2009-01-23 23:10
Thanks, Philip.  You are second person to suggest hoptoadapp.  I like
what they are doing, however my main concern was the privacy of our
data, particularly since we accept credit cards, etc. on our site (even
thought we filter confidential data using "filter_parameter_logging" but
you never know if some filtering was missed since our codebase has grown
large over time.

Thanks again.


Philip Hallstrom wrote:
>> URL
>> and not have it logged?
>
> Not a direct answer to your question, but you may consider switching
> your setup to use hoptoad and then if they haven't already integrated
> my patch to ignore certain user agents, patch it do to so.  Or just
> look at my patch and adjust it to fit your scenario.
>
> http://hoptoadapp.com/welcome
> http://pjkh.com/articles/2009/01/06/rails-exceptio...
>
> No affiliation, just like their service...
>
> -philip
This topic is locked and can not be replied to.