Lowering Logging Sensitivity

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”.

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.

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

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

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


Regards, Charles.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs