Skip to content

Commit 6a6f1fb

Browse files
committed
2 parents f368e1d + d19314b commit 6a6f1fb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/google/api_client/railtie.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ class APIClient
1010
#
1111
class Railtie < Rails::Railtie
1212
initializer 'google-api-client' do |app|
13-
Google::APIClient.logger = app.logger
13+
_logger = case
14+
when app.respond_to?(:logger) then app.logger
15+
when app.config.respond_to?(:logger) then app.config.logger
16+
else Rails.logger
17+
end
18+
19+
Google::APIClient.logger = _logger
1420
end
1521
end
1622
end

0 commit comments

Comments
 (0)