class Lumberjack::Rack::RequestId
if the abbreviated argument is true.
The format is expected to be a random UUID and only the first chunk is used for terseness
Support for using the Rails ActionDispatch request id in the log.
def call(env)
def call(env) request_id = env[REQUEST_ID] if request_id && @abbreviated request_id = request_id.split("-", 2).first end Lumberjack.unit_of_work(request_id) do @app.call(env) end end
def initialize(app, abbreviated = false)
def initialize(app, abbreviated = false) @app = app @abbreviated = abbreviated end