Class: Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudreach-logger.rb

Overview

HACK: this patches the logger class so we can set pairs of values to append to every log after initialisation (e.g request_id)

TODO: write a proper logger class for ourselves

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_pairsObject

Returns the value of attribute _pairs.



14
15
16
# File 'lib/cloudreach-logger.rb', line 14

def _pairs
  @_pairs
end

Instance Method Details

#set(**params) ⇒ Object



16
17
18
19
# File 'lib/cloudreach-logger.rb', line 16

def set(**params)
  @_pairs = @_pairs || {}
  @_pairs = @_pairs.merge(params)
end