Skip to content

Instantly share code, notes, and snippets.

@umdstu
Created January 22, 2015 17:48
Show Gist options
  • Save umdstu/991b6b6cce3a47987d58 to your computer and use it in GitHub Desktop.
Save umdstu/991b6b6cce3a47987d58 to your computer and use it in GitHub Desktop.
config.logger = ActionSupport::TaggedLogging.new(
TestApp.new(config.paths['log'].first)
)
config.log_tags = [lambda { |req|
session = Session.find_by_session_id(req.cookie_jar["_test_app"])
uid = 'nil'
unless session.nil?
session_hash = Marshal.restore(Base64.decode64(session.data))
if session_hash['user']
uid = session_hash['user'].uid
end
end
uid
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment