Class: Mack::Logging::ColorLayout
- Inherits:
-
BasicLayout
- Object
- Logging::Layout
- BasicLayout
- Mack::Logging::ColorLayout
- Defined in:
- lib/mack/boot/logging/color_layout.rb
Overview
:nodoc:
Instance Method Summary collapse
Methods inherited from Logging::Layout
Constructor Details
This class inherits a constructor from Logging::Layout
Instance Method Details
#format(event) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/mack/boot/logging/color_layout.rb', line 6 def format(event) = super(event) if .match(/(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP)/) return Mack::Utils::Ansi::Color.wrap(configatron.mack.log.colors.db, ) else color = configatron.mack.log.colors.retrieve(event.level_name.downcase.to_sym, nil) if color return Mack::Utils::Ansi::Color.wrap(color, ) else return end end end |