If multiple processes (e.g. rails rake tasks) that instantiate the ruby-aws lib are running from the same base dir many
will fail as they cannot share the Logger file that this lib insists on writing.
The code does not allow passing in of a Logger instance, or turning off the logging functionality altogether.
I was forced to monkey patch the library in order for it to work for me:
module Amazon
module Util
module Logging
def log( str )
#set_log 'ruby-aws.log' if @@AmazonLogger.nil?
#@@AmazonLogger.debug str
end
end
end
end
Please allow for passing in a Ruby logger instance (e.g. Rails.logger) as part of the initialization, and please also
allow passing in a nil or false as part of the initialization to turn off logging altogether if desired. |