Method: Timber::CurrentContext#add
- Defined in:
- lib/timber/current_context.rb
#add(*contexts) ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/timber/current_context.rb', line 70 def add(*contexts) contexts.each do |context| key = context.keyspace json = context.as_json # Convert to json now so that we aren't doing it for every line if key == :custom # Custom contexts are merged into the space hash[key] ||= {} hash[key].merge(json) else hash[key] = json end end end |