Skip to content

Instantly share code, notes, and snippets.

@betesh
Created September 17, 2014 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betesh/275c55abe7436417177b to your computer and use it in GitHub Desktop.
Save betesh/275c55abe7436417177b to your computer and use it in GitHub Desktop.
middleware that just logs
class JustLogEnv
def initialize(app)
@app = app
end
def call(env)
Rails.logger.info env.inspect
@app.call(env)
end
end
# In your config/application.rb, add this line:
config.middleware.use JustLogEnv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment