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:
parent
19c8e74e85
commit
23687d770d
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue