Skip to content
forked from jpoz/almaz

Rack middleware logs all paths and queries with Redis

License

Notifications You must be signed in to change notification settings

revelation/almaz

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Almaz

Almaz is always watching!

Explanation

Almaz is rack middlware which logs request information to a redis server, under a preset user session variable.

Example

Almaz::Capture

  
    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::’.

About

Rack middleware logs all paths and queries with Redis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%