Module: Finicity::Logger
- Included in:
- V1::Request::ActivateAccounts, V1::Request::ActivateAccountsWithMfa, V1::Request::AddCustomer, V1::Request::DeleteAccount, V1::Request::DeleteCustomer, V1::Request::DiscoverAccounts, V1::Request::DiscoverAccountsWithMfa, V1::Request::GetAccounts, V1::Request::GetCustomers, V1::Request::GetCustomersByUsername, V1::Request::GetInstitution, V1::Request::GetInstitutions, V1::Request::GetLoginForm, V1::Request::GetTransactions, V1::Request::InteractiveRefreshAccount, V1::Request::InteractiveRefreshAccountWithMfa, V1::Request::RefreshAccounts, V1::Request::UpdateCredentials
- Defined in:
- lib/finicity/logger.rb
Instance Method Summary collapse
Instance Method Details
#log_request ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/finicity/logger.rb', line 3 def log_request ::Finicity.logger.debug do log = "REQUEST: #{self.class.name}" log << "\n URL: #{url}" if self.respond_to?(:url) log << "\n QUERY: #{query}" if self.respond_to?(:query) log << "\n BODY: #{mask_body(body)}" if self.respond_to?(:body) log end end |
#mask_body(body) ⇒ Object
13 14 15 16 17 |
# File 'lib/finicity/logger.rb', line 13 def mask_body(body) body = body.gsub(/<value>.*<\/value>/, "<value>[FILTERED]</value>") body = body.gsub(/<answer>.*<\/answer>/, "<answer>[FILTERED]</answer>") body end |