Forum: Ruby on Rails Lowering Logging Sensitivity

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.
Ccf841d92f30daf404e49f6faa59a387?d=identicon&s=25 Scott Doane (Guest)
on 2006-01-07 04:58
(Received via mailing list)
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".
3f900b38ec3b2c45427c354722fa4ce3?d=identicon&s=25 Tom Fakes (tomfakes)
on 2006-01-07 05:50
(Received via mailing list)
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.
Ccf841d92f30daf404e49f6faa59a387?d=identicon&s=25 Scott Doane (Guest)
on 2006-01-08 04:11
(Received via mailing list)
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
37b7b848b1e3d667174d28d32d04bcee?d=identicon&s=25 Charles M. Gerungan (Guest)
on 2006-01-08 11:14
(Received via mailing list)
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-...

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

--
Regards, Charles.
This topic is locked and can not be replied to.