Created
June 18, 2009 18:59
-
-
Save pantulis/132125 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 MyRackFilter | |
def initialize(app, logger = nil) | |
@app = app | |
@logger = logger | |
end | |
def call(env) | |
@logger.debug("Hit, hit!") | |
status, headers, response = @app.call(env) | |
end | |
end |
This file contains hidden or 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
Rails::Initializer.run do |config| | |
# Settings in config/environments/* take precedence over those specified here. | |
# Application configuration should go into files in config/initializers | |
# -- all .rb files in that directory are automatically loaded. | |
# Add additional load paths for your own custom dirs | |
# config.load_paths += %W( #{RAILS_ROOT}/extras ) | |
config.middleware.use "MyRackFilter", Logger.new(STDERR) | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment