Created
April 12, 2011 08:17
-
-
Save coffeeaddict/915154 to your computer and use it in GitHub Desktop.
Monkey patch to get strawberry flavored errors
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
module ActiveSupport | |
# log errors in red | |
class BufferedLogger | |
alias_method :orig_error, :error | |
def error msg | |
if Rails.env != :production | |
msg = "\e[1;31m#{msg}\e[0m" | |
end | |
orig_error msg | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment