Open epaune-k opened 9 years ago
But this only adds this variables when there is an error, but not in the general log, isn't it? If you don't want to add them now in the gem, we could add them in application using rails tagged logger:
config.log_tags = [
:uuid, #request_id
:remote_ip,
lambda { |req|
if req.cookie_jar && session_id = req.cookie_jar.signed['_kantox_session_id']
session_id
else
'no_session'
end
}
]
Good point. Reopened.
Session id is stored in env variable _APPNAME_session_id request_id in
action_dispatch.request_id
, added by middlewareActionDispatch::RequestId
This middleware is after Rack::Cache in the middleware stack, so we need to remove and add it before HackMiddlewareSettings