Date: 2007-12-24 04:46
Sender: James Blair
In case it's helpful for others, I simply disable logging altogether
(the files can get very large, very fast). When I'm trying to
debug requests I'll turn them back on by simply uncommenting
out the lines in question. It's not beautiful code, but it gets
the job done. Here's what my "default" configuration
looks like:
require 'logger'
module Amazon
module Util
module Logging
@@AmazonLogger = nil
def set_log( filename )
#@@AmazonLogger = Logger.new filename
end
def log( str )
#set_log 'ruby-aws.log' if @@AmazonLogger.nil?
#@@AmazonLogger.debug str
end
end
end
end
|
Date: 2007-08-17 23:29
Sender: James Blair
Personally, I'd prefer logging to be disabled at first, but easily
enabled with a simple method call. If that method call also forced
me to provide a path, else it defaulted to the current path and
some generic filename (as we have today), that would be fine. |