views:

43

answers:

2

I've found the method set_log in the documentation, I just can't figure out the syntax to call it. Here's what I tried:

require 'ruby-aws'
Amazon::Util::Logging.set_log('my.log')
NoMethodError: undefined method `set_log' for Amazon::Util::Logging:Module
A: 

You can see that Amazon::Util::Logging is a module and set_log is a 'Public Instance method'. So you need

class NewClass
 include Amazon::Util::Logging

  def foo
    set_log('file.txt')
    log 'debug_message'
  end
end
aaz
A: 

Is there a way to completely turn off logging for ruby-aws??

Sid Viswanathan
module Amazon::Util::Logging; def log(str); end; end
lawrence