Module: Blabbermouth::Bystanders::Formatter
- Included in:
- Stdout
- Defined in:
- lib/blabbermouth/bystanders/formatter.rb
Instance Method Summary collapse
Instance Method Details
#log_message(event, key, msg, data = {}) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/blabbermouth/bystanders/formatter.rb', line 8 def (event, key, msg, data={}) = "[#{}] Blabbermouth.#{event.to_s}: #{key.to_s}" += ": #{msg.to_s}" unless msg.to_s.blank? += " #{data.to_s}" end |
#timestamp ⇒ Object
4 5 6 |
# File 'lib/blabbermouth/bystanders/formatter.rb', line 4 def ::Time.now.strftime('%Y/%m/%d %H:%M:%S %Z') end |