Class: Spirit::Logger
- Inherits:
-
Logger
- Object
- Logger
- Spirit::Logger
- Defined in:
- lib/spirit/logger.rb
Overview
Constant Summary collapse
- COLORS =
{ clear: 0, red: 31, green: 32, blue: 35, yellow: 33, grey: 37 }.freeze
- ACTION_COLORS =
{ error: :red, warning: :yellow, problem: :blue, }.freeze
Instance Method Summary collapse
-
#record(action, *args) ⇒ Object
Record that an action has occurred.
Instance Method Details
#record(action, *args) ⇒ Object
Record that an action has occurred.
17 18 19 20 21 22 23 24 |
# File 'lib/spirit/logger.rb', line 17 def record(action, *args) msg = '' msg << color(ACTION_COLORS[action]) msg << action_padding(action) + action.to_s msg << color(:clear) msg << ' ' + args.join(' ') info msg end |