Skip to content

Commit ee731e3

Browse files
committed
Update append_info_to_payload to take global context into account
1 parent 34c6710 commit ee731e3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/rage/controller/api.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,13 @@ def __run_#{action}
153153
<<~RUBY
154154
context = {}
155155
append_info_to_payload(context)
156-
Thread.current[:rage_logger][:context] = context
156+
157+
log_context = Thread.current[:rage_logger][:context]
158+
if log_context.empty?
159+
Thread.current[:rage_logger][:context] = context
160+
else
161+
Thread.current[:rage_logger][:context] = log_context.merge(context)
162+
end
157163
RUBY
158164
end}
159165
end

0 commit comments

Comments
 (0)