views:

193

answers:

1

Is it possible to configure rails to show logger.debug messages (from logger.debug statements inside controllers) to display inside test.log (or to the console) when running unit and functional tests?

I added the following to test_helper.rb. I see messages from logger.debug statements directly inside tests but no messages from logger statements inside controller methods?

def logger
    RAILS_DEFAULT_LOGGER
end
+1  A: 

Works fine for me. Have you set your config.log_level to something specific?

Eitherway,

config.log_level = :debug 

should work?

Apie
Thanks, I thought rails defaulted to outputting logger messages when running tests. But that's not the case. After specifically adding the `config.log_level = :debug` to environments/test.rb, I started to see log messages in test.log.
Dave Paroulek