# Lowering Logging Sensitivity

**URL:** <https://www.ruby-forum.com/t/lowering-logging-sensitivity/51802>\
**Category:** Rails\
**Created:** [January 7, 2006, 4:58am UTC](https://www.ruby-forum.com/t/lowering-logging-sensitivity/51802 "2006-01-07T04:58:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scott\_Doane](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Scott\_Doane](https://www.ruby-forum.com/u/Scott_Doane)\
**Post date:** [January 7, 2006, 4:58am UTC](https://www.ruby-forum.com/t/lowering-logging-sensitivity/51802/1 "2006-01-07T04:58:58Z")

</div>

Is there a way to reduce logging when in production? I’m not terribly  
interested in the items that return status 200. I would like to limit  
the production logs to simply application errors and “explosions”.

---

<div class="post-metadata">

**Author:** ![Scott\_Doane](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Scott\_Doane](https://www.ruby-forum.com/u/Scott_Doane)\
**Post date:** [January 7, 2006, 5:50am UTC](https://www.ruby-forum.com/t/lowering-logging-sensitivity/51802/2 "2006-01-07T05:50:01Z")

</div>

By default, the logging level in production is ‘info’. If you raise  
this to  
‘warn’, the per-request spew goes away.

In your 'config/environments/production.rb:

config.log\_level = :warn

One problem with this is that, when an error occurs, you will have  
missed  
the action and its parameters being logged - you’ll only get the error  
stack  
trace.

---

<div class="post-metadata">

**Author:** ![Scott\_Doane](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Scott\_Doane](https://www.ruby-forum.com/u/Scott_Doane)\
**Post date:** [January 8, 2006, 4:11am UTC](https://www.ruby-forum.com/t/lowering-logging-sensitivity/51802/3 "2006-01-08T04:11:43Z")

</div>

Good to know, thank you.

I figured I’d miss the surrounding parameters, but in this case I  
think it’s worth it. I’ve got Loggers set up to throw more  
descriptive errors when stuff goes boom. The application is an online  
chat tool with a bazillion automated ajax requests. Figured it was  
either turn down the per-request or I’d be running log cleanings  
every hour.

-Scotty

---

<div class="post-metadata">

**Author:** ![Scott\_Doane](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Scott\_Doane](https://www.ruby-forum.com/u/Scott_Doane)\
**Post date:** [January 8, 2006, 11:14am UTC](https://www.ruby-forum.com/t/lowering-logging-sensitivity/51802/4 "2006-01-08T11:14:43Z")

</div>

On 8-jan-2006, at 4:09, Scott Doane wrote:

> Figured it was either turn down the per-request or I’d be running  
> log cleanings every hour.

[http://blog.caboo.se/articles/2005/12/15/who-said-size-is-not-important](http://blog.caboo.se/articles/2005/12/15/who-said-size-is-not-important)

If you want the size of your logfiles to be predictable.

–  
Regards, Charles.
