# How can I disable the rails logging in development?

**URL:** <https://www.ruby-forum.com/t/how-can-i-disable-the-rails-logging-in-development/160861>\
**Category:** Mongrel\
**Created:** [February 20, 2009, 12:53pm UTC](https://www.ruby-forum.com/t/how-can-i-disable-the-rails-logging-in-development/160861 "2009-02-20T12:53:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roallen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/3e96dc/32.png) [@roallen](https://www.ruby-forum.com/u/roallen)\
**Post date:** [February 20, 2009, 12:53pm UTC](https://www.ruby-forum.com/t/how-can-i-disable-the-rails-logging-in-development/160861/1 "2009-02-20T12:53:37Z")

</div>

I can’t seem to disable rails logging when using Mongrel. Any fix for  
this?

Also unanswered on the Rails forum:  
[http://www.ruby-forum.com/topic/109422#784596](http://www.ruby-forum.com/topic/109422#784596)

Re: how can I disable the SQL logging which occurs in develo  
Posted by Greg H. (Guest) on 29.05.2007 21:22  
You’re exactly correct Isak! Thanks.

The logging functionality worked as it should in webrick. Is seems  
screwed up in Mongrel. I’ll swap to using webrick in development (and  
try to  
find out where/how to let the Mongrel team about this).

Interestingly I noted that with webrick the logging doesn’t come out on  
the console, but rather I had to open a second iTerm and tail the log  
file  
itself. Perhaps there is a “script/server webrick” setting I could use  
to enable logging to console if I went looking.

Tks  
Greg

---

<div class="post-metadata">

**Author:** ![roallen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/3e96dc/32.png) [@roallen](https://www.ruby-forum.com/u/roallen)\
**Post date:** [February 20, 2009, 4:29pm UTC](https://www.ruby-forum.com/t/how-can-i-disable-the-rails-logging-in-development/160861/2 "2009-02-20T16:29:40Z")

</div>

I’ve had no trouble disabling Rails logging using mongrel.

In fact, I specifically do what you asked, turn off the SQL logging in  
development. I do it with these lines in my development.rb:

ar\_logger = config.logger.clone  
ar\_logger.level = Logger::INFO  
ActiveRecord::Base.logger = ar\_logger

Works fine for me in Rails 2.1. I believe it used to work fine for me  
in Rails 1.x too. Using mongrel yeah, no problem.

So I’m not sure what problem you’re having, but I don’t think it’s  
universal to mongrel.

Jonathan
