comfy/comfortable-mexican-sofa — pull request #144 by holli (2012-02-01 23:14:09+00:00)
Title: Logging with Rails.logger by default, also includes setters to change it, fixtures puts replaced with logger

This small fix doesn't brake anything existing code.

## Fixture.rb annoying output

Fixture.rb used $stdout.puts to output information. It was annoying when I had a custom rake task to export or include all sites. I replaced it with ComfortableMexicanSofa.logger.warn.

Rake task includes now settings that logging is shown in screen in the same way as previously

ComfortableMexicanSofa.logger = Logger.new(STDOUT)

## New logger procedure

ComfortableMexicanSofa.logger=
ComfortableMexicanSofa.logger (which returns Rails.logger by default)

This logger can be used from now on to log warnings etc. User can easily set the loggers warning level to whatever he chooses.

## Other implications

test_helper.rb had the following to disable the noise from fixture.rb

$stdout_orig = $stdout
$stderr_orig = $stderr
$stdout = StringIO.new
$stderr = StringIO.new

Which also affected tests so that deprecation warnings were not shown. I hope this was unintentional? I got the following right away. These have to be fixed later.

```
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. You can simply remove the handler name or pass render :handlers => [:erb] instead. (called from realtime at ....rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/benchmark.rb:308)
```