Created
September 17, 2014 22:10
-
-
Save betesh/275c55abe7436417177b to your computer and use it in GitHub Desktop.
middleware that just logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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