30 lines
509 B
Ruby
30 lines
509 B
Ruby
|
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
|
||
|
end
|
||
|
|
||
|
##
|
||
|
# Module to make accessing the logger simpler
|
||
|
module Logging
|
||
|
##
|
||
|
# Logger for the API client
|
||
|
#
|
||
|
# @return [Logger] logger instance.
|
||
|
def logger
|
||
|
Google::APIClient.logger
|
||
|
end
|
||
|
end
|
||
|
|
||
|
end
|