Configure logger for Google API calls
This commit is contained in:
parent
d344256013
commit
2f1e0b8ccd
@ -1,4 +1,5 @@
|
|||||||
require 'google/api_client/client_secrets'
|
require 'google/api_client/client_secrets'
|
||||||
|
require 'google/apis'
|
||||||
|
|
||||||
secrets_options = {
|
secrets_options = {
|
||||||
"client_id" => ENV['GOOGLE_CLIENT_ID'],
|
"client_id" => ENV['GOOGLE_CLIENT_ID'],
|
||||||
@ -9,4 +10,5 @@ secrets_options = {
|
|||||||
"auth_provider_x509_cert_url" => "https://www.googleapis.com/oauth2/v1/certs"
|
"auth_provider_x509_cert_url" => "https://www.googleapis.com/oauth2/v1/certs"
|
||||||
}
|
}
|
||||||
CLIENT_SECRETS = Google::APIClient::ClientSecrets.new("web" => secrets_options)
|
CLIENT_SECRETS = Google::APIClient::ClientSecrets.new("web" => secrets_options)
|
||||||
|
Google::Apis.logger = ::Rails.logger
|
||||||
|
Google::Apis.logger.level = Logger::INFO if Rails.env.production?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user