Class: Locomotive::Wagon::SyncLogger
- Inherits:
-
BaseLogger
- Object
- BaseLogger
- Locomotive::Wagon::SyncLogger
- Defined in:
- lib/locomotive/wagon/commands/loggers/sync_logger.rb
Instance Method Summary collapse
-
#initialize ⇒ SyncLogger
constructor
A new instance of SyncLogger.
Constructor Details
#initialize ⇒ SyncLogger
Returns a new instance of SyncLogger.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/locomotive/wagon/commands/loggers/sync_logger.rb', line 7 def initialize subscribe :start do |event| log "\n" log "Syncing #{event.payload[:name].camelcase}", { color: :black, background: :white } end subscribe :writing do |event| log "writing #{event.payload[:label]}", :white, 2, true end subscribe :write_with_success do |event| log ' [' + 'done'.colorize(:green) + ']' end end |