diff --git a/lib/awesome_print/ext/active_support.rb b/lib/awesome_print/ext/active_support.rb index 82e2122..7cce1f7 100644 --- a/lib/awesome_print/ext/active_support.rb +++ b/lib/awesome_print/ext/active_support.rb @@ -38,3 +38,10 @@ module AwesomePrint end AwesomePrint::Formatter.send(:include, AwesomePrint::ActiveSupport) +# +# Colorize Rails logs. +# +if defined?(ActiveSupport::LogSubscriber) + AwesomePrint.force_colors! ActiveSupport::LogSubscriber.colorize_logging +end +