Class: Legate::Tools::Base::HttpClient::QuietInstrumentor

Inherits:
Excon::StandardInstrumentor
  • Object
show all
Defined in:
lib/legate/tools/base/http_client.rb

Overview

Custom instrumentor that only logs errors

Instance Method Summary collapse

Instance Method Details

#instrument(name, params = {}) ⇒ Object



26
27
28
29
30
# File 'lib/legate/tools/base/http_client.rb', line 26

def instrument(name, params = {})
  # Only log if there's an error
  Legate.logger.error("[#{name}] #{params[:error]}") if params[:error]
  yield if block_given?
end