Merge branch 'main' from workbench2.git
[arvados.git] / sdk / ruby-google-api-client / lib / google / api_client / railtie.rb
1 require 'rails/railtie'
2 require 'google/api_client/logging'
3
4 module Google
5   class APIClient
6     
7     ##
8     # Optional support class for Rails. Currently replaces the built-in logger
9     # with Rails' application log.
10     #
11     class Railtie < Rails::Railtie
12       initializer 'google-api-client' do |app|
13         logger = app.config.logger || Rails.logger
14         Google::APIClient.logger = logger unless logger.nil?
15       end
16     end
17   end
18 end