1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00

Colorize logger.ap output in Rails if ActiveSupport::LogSubscriber.colorize_logging is set (which is on by default)

This commit is contained in:
Michael Dvorkin 2011-12-16 13:24:14 -08:00
parent 19c8e74e85
commit 23687d770d

View file

@ -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