lib/yammer/configurable.rb in yammer-client-0.1.7 vs lib/yammer/configurable.rb in yammer-client-0.1.8
- old
+ new
@@ -46,7 +46,22 @@
# Convenience method to allow configuration options to be set in a block
def configure
yield self if block_given?
self
end
+
+ def enable_logging(output='stdout')
+ self.http_adapter.log = output
+ end
+
+ def disable_logging
+ self.http_adapter.log = nil
+ end
+
+ def with_logging(output)
+ cached_output = self.http_adapter.log
+ enable_logging(output)
+ yield self if block_given?
+ self.http_adapter.log = cached_output
+ end
end
end