Adjust Log Level in Ruby on Rails

To adjust your log level for a Rails project, you have two options.

  1. Edit config/environment.rb and set a global log level. This will override all environments (development, production, etc).

  2. Edit config/environments/production.rb, for instance to change production's log level. This is recommended. Simply add the line config.log_level = :warn to set WARN level. This will greatly decrease the amount of logging performed.

Post a Comment

Popular posts from this blog

I ported a JavaScript app to Dart. Here's what I learned.

Converting Array to List in Scala

Minification is not enough, you need tree shaking