Skip to content

Instantly share code, notes, and snippets.

@joefiorini
Created December 17, 2008 22:19
Show Gist options
  • Save joefiorini/37265 to your computer and use it in GitHub Desktop.
Save joefiorini/37265 to your computer and use it in GitHub Desktop.
# Add this as an initializer or to environments/development.rb for nicer logger output (thanks epitron for helping with this idea)
# Usage: logger.red "Blah"
# Shows messages in your log with a red background and bold, white text
class ActiveSupport::BufferedLogger
def red(m)
emphasized = "\e[1;1m\e[41m #{m} \e[0m"
debug(emphasized)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment