Fix logger, take #2
This commit is contained in:
parent
3eac086797
commit
dcd1eb916a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue