Forum: Ruby on Rails Rails Development Log

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
jen (Guest)
on 2007-03-24 06:31
I am using Ruby+Rails with Mongrel.
Is there any way to disable logging so that everytime I start rails
(mongrel_rails start), it doesn't automatically start logging info to
Eden L. (Guest)
on 2007-03-25 07:35
(Received via mailing list)
open config/environments/development.rb and you'll see instantly how
you can turn off logging ;-)
jen (Guest)
on 2007-03-25 08:58
Thanks, Eden.
I took a look at that file but couldn't find an option that would turn
off logging (i know i'm probably dumb :) and it must be something

Anyway I'm copying the config/environments/development.rb file below...
maybe you could take a look and give some guidance?  Thanks for your

# Settings specified here will take precedence over those in

# In the development environment your application's code is reloaded on
# every request.  This slows down response time but is perfect for
# since you don't have to restart the webserver when you make code
config.cache_classes = false

# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true

# Enable the breakpoint server that script/breakpointer connects to
config.breakpoint_server = true

# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching             = false
config.action_view.cache_template_extensions         = false
config.action_view.debug_rjs                         = true

# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
Eden L. (Guest)
on 2007-03-25 23:53
(Received via mailing list)
Oh sorry about that.  I thought it would be sticking out like a sore
thumb, but apparently it's not very easy to turn off logging.  You can
turn it down.

Here's a hack I came up with that seems to work on my machine, but I
don't know if I'd put this into production.  Add this line to the
environment file you want to turn off logging for:

  config.logger = { def method_missing(*m);
end; self }

It sets the logger to a dead, do nothing object.  Setting logger to
nil and just a plain old don't work -- this one does
jen (Guest)
on 2007-03-26 09:06
Thanks, Eden! I'll try that.  The reason I wanted to temorarily disable
logging was cuz the log files were getting huge in size.
Fred (Guest)
on 2007-03-26 12:08
Alternatively stick
config.log_level = :info
into your development.rb file (see
for info on what some of the other things there do).

This will filter out a lot of the stuff in the log (eg you won't see all
SQL queries made any more) but you'll still be able to see what requests
are being made and so on. You can crank it up even higher if you only
want to see errors, by setting config.log_level to :error

jen (Guest)
on 2007-03-27 08:32
Thanks, Fred.  I'm going to try both the suggestions and hopefully it'll
reduce the size of the log files!
This topic is locked and can not be replied to.