Fix logger, take #2

This commit is contained in:
Steven Bazyl 2014-12-19 15:45:20 -08:00
parent 3eac086797
commit dcd1eb916a
2 changed files with 3 additions and 8 deletions

View File

@ -10,13 +10,8 @@ module Google
#
class Railtie < Rails::Railtie
initializer 'google-api-client' do |app|
_logger = case
when app.respond_to?(:logger) then app.logger
when app.config.respond_to?(:logger) then app.config.logger
else Rails.logger
end
Google::APIClient.logger = _logger
logger = app.config.logger || Rails.logger
Google::APIClient.logger = logger unless logger.nil?
end
end
end

View File

@ -19,7 +19,7 @@ module Google
MAJOR = 0
MINOR = 8
TINY = 1
PATCH = nil
PATCH = 1
STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
end
end