class Telegram::Bot::UpdatesController::LogSubscriber

Public Instance Methods

halted_callback(event) click to toggle source
# File lib/telegram/bot/updates_controller/log_subscriber.rb, line 29
def halted_callback(event)
  info { "Filter chain halted at #{event.payload[:filter].inspect}" }
end
process_action(event) click to toggle source
# File lib/telegram/bot/updates_controller/log_subscriber.rb, line 15
def process_action(event)
  info do
    payload   = event.payload
    additions = UpdatesController.log_process_action(payload)
    message = "Completed in #{event.duration.round}ms"
    message << " (#{additions.join(' | ')})" if additions.present?
    message
  end
end
respond_with(event) click to toggle source
# File lib/telegram/bot/updates_controller/log_subscriber.rb, line 25
def respond_with(event)
  info { "Responded with #{event.payload[:type]}" }
end
start_processing(event) click to toggle source
# File lib/telegram/bot/updates_controller/log_subscriber.rb, line 7
def start_processing(event)
  info do
    payload = event.payload
    "Processing by #{payload[:controller]}##{payload[:action]}\n" \
    "  Update: #{payload[:update].to_json}"
  end
end