Almaz is always watching!
Almaz is rack middlware which logs request information to a redis server, under a preset user session variable.
require 'almaz'
use Almaz::Capture
Almaz.config[:redis] = {:db => 0, :host => 'localhost', :port => 6379} # this is also the default
Almaz.config[:session_variable] = :user #this is also the default
By using Almaz::Capture and setting the session_variable to :user, all requests are now logged under ‘almaz::user::(session[:user])’ in redis. Each user gets a separate list in the redis DB. All requests that don’t have the session variable :user are logged under ‘almaz::user::’.