Created
July 26, 2013 12:04
-
-
Save jumski/6088357 to your computer and use it in GitHub Desktop.
custom exception logger
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
require './application.rb' | |
class CustomExceptionLogger | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
@app.call(env) | |
rescue Exception => e | |
puts '============================================' | |
puts '============================================' | |
puts '============================================' | |
puts '============================================' | |
puts '============================================' | |
puts '============================================' | |
end | |
end | |
use CustomExceptionLogger | |
run Application |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment