class Lognow::Printer
Public Class Methods
new(logger, status, event, data, error)
click to toggle source
# File lib/lognow/printer.rb, line 3 def initialize(logger, status, event, data, error) @logger = logger @status = status @event = event @data = data @error = error end
Public Instance Methods
print()
click to toggle source
# File lib/lognow/printer.rb, line 11 def print i = { status: @status, timestamp: Time.now, event: AppEvents::TYPES.fetch(@event), data: @data } i[:error] = @error if @error @logger.info i.to_json end