views:

90

answers:

1

I'm using the RighAWS gem, and mocking at the http level so that the RightAWS code is being executed as part of my tests.

When this happens I get the following output

....New RightAws::S3Interface using per_request-connection mode Opening new HTTP connection to s3.amazonaws.com:80 .New RightAws::S3Interface using per_request-connection mode .

Even though all the tests pass, when I do have errors its harder to scan them because of this output. is there a nice way to silence it?

A: 

you can use null device for logging:

s3 = RightAws::S3Interface.new(access_key, secret_key, {:port => 80, :protocol => 'http', :logger => Logger.new('/dev/null')})  //on unix system
s3 = RightAws::S3Interface.new(access_key, secret_key, {:port => 80, :protocol => 'http', :logger => Logger.new('NUL')})  //on windows

bhups