lib/fake_sqs.rb in fake_sqs-0.1.0 vs lib/fake_sqs.rb in fake_sqs-0.2.0
- old
+ new
@@ -18,11 +18,13 @@
require 'fake_sqs/web_interface'
app = FakeSQS::WebInterface
if (log = options[:log])
- $stdout.reopen(log, "w:utf-8")
- $stderr.reopen(log, "w:utf-8")
+ file = File.new(log, "a+")
+ file.sync = true
+ app.use Rack::CommonLogger, file
+ app.set :log_file, file
app.enable :logging
end
if options[:verbose]
require 'fake_sqs/show_output'