Sunday, August 4, 2013

Rails 2 debug logger


I need to have clean log for a Rails 2 app. So follow the guide to change the environment.rb:

Rails::Initializer.run do |config|

config.log_level = :debug

From myController:
logger.debug "Debug some thing"

But it didn't work. There's no log in the development.log!

Then switch to 
config.log_level = :warn

From myController:
logger.warn "This works!"

Worked! Don't know why? But that's it.

No comments:

Post a Comment