google-api-ruby-client/lib/google/api_client/logging.rb

32 lines
533 B
Ruby
Raw Normal View History

2012-12-30 19:26:18 +00:00
require 'logger'
module Google
class APIClient
class << self
##
# Logger for the API client
#
# @return [Logger] logger instance.
attr_accessor :logger
end
self.logger = Logger.new(STDOUT)
self.logger.level = Logger::WARN
2013-01-05 00:14:14 +00:00
2012-12-30 19:26:18 +00:00
##
2013-01-05 00:14:14 +00:00
# Module to make accessing the logger simpler
module Logging
##
# Logger for the API client
#
# @return [Logger] logger instance.
def logger
Google::APIClient.logger
end
2012-12-30 19:26:18 +00:00
end
2013-01-05 00:14:14 +00:00
2012-12-30 19:26:18 +00:00
end
2013-01-05 00:14:14 +00:00
2012-12-30 19:26:18 +00:00
end