Working on major restructuring

This commit is contained in:
2025-12-20 15:30:24 -07:00
parent f4c5ba1f14
commit 645a47b98a
53 changed files with 226 additions and 1407 deletions
+18
View File
@@ -0,0 +1,18 @@
module GameServer
module Logging
module Context
def self.with(data)
old = Thread.current[:log_ctx]
Thread.current[:log_ctx] = data
yield
ensure
Thread.current[:log_ctx] = old
end
def self.current
ctx = Thread.current[:log_ctx]
ctx ? ctx.map { |k,v| "#{k}=#{v} " }.join : ""
end
end
end
end