Class: Excon::StandardInstrumentor

Inherits:
Object
  • Object
show all
Defined in:
lib/excon/instrumentors/standard_instrumentor.rb

Class Method Summary collapse

Class Method Details

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



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/excon/instrumentors/standard_instrumentor.rb', line 4

def self.instrument(name, params = {})
  params = params.dup

  # reduce duplication/noise of output
  params.delete(:connection)
  params.delete(:stack)

  params = Utils.redact(params)

  $stderr.puts(name)
  Excon::PrettyPrinter.pp($stderr, params)

  if block_given?
    yield
  end
end