[Mongrel] anyway to exclude logging for a given IP address?

Joey Geiger jgeiger at gmail.com
Tue Jul 31 15:43:01 EDT 2007

This is a rails question.

The way I did it was to create a specific monit controller, that has a
single action and define logger to be empty so it just does nothing,
which keeps it from writing to the log file. Index just calls
index.rhtml which just has the word "success" in it. Not sure if that
or :render :text => "success" is faster, but either works.

class MonitController < ActionController::Base
  session :off
##   this is used by the monitoring scripts to see if the mongrel is
up and running
  def index
  def logger

On 7/31/07, Joel Nylund <jnylund at yahoo.com> wrote:
> Hi, im not sure if this is a mongrel or rails question, so im sorry
> if I got the wrong list.
> Is there anyway to turn off logging (in production.log) if a request
> comes from a given IP address. I use monit to watch everything, and I
> get tons of this in my log file:
> Processing AccountController#login (for at 2007-07-31
> 14:06:28) [GET]
>    Parameters: {"action"=>"login", "controller"=>"account"}
> Rendering layoutfalse within layouts/login
> Rendering account/login
> Completed in 0.00390 (256 reqs/sec) | Rendering: 0.00286 (73%) | DB:
> 0.00078 (19%) | 200 OK [http:// /]
> thanks
> Joel
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

More information about the Mongrel-users mailing list