Class: Textris::Delivery::Log
Constant Summary collapse
- AVAILABLE_LOG_LEVELS =
%w{debug info warn error fatal unknown}
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Textris::Delivery::Base
Instance Method Details
#deliver(to) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/textris/delivery/log.rb', line 6 def deliver(to) log :info, "Sent text to #{Phony.format(to)}" log :debug, "Texter: #{.texter || 'UnknownTexter'}" + "#" + "#{.action || 'unknown_action'}" log :debug, "Date: #{Time.now}" log :debug, "From: #{.from || .twilio_messaging_service_sid || 'unknown'}" log :debug, "To: #{.to.map { |i| Phony.format(to) }.join(', ')}" log :debug, "Content: #{.content}" (.media_urls || []).each_with_index do |media_url, index| = index == 0 ? "Media URLs: " : " " << media_url log :debug, end end |