lib/tasks/telegram-bot.rake in telegram-bot-0.16.0 vs lib/tasks/telegram-bot.rake in telegram-bot-0.16.1

- old
+ new

@@ -5,10 +5,14 @@ task :poller do ENV['BOT_POLLER_MODE'] = 'true' Rake::Task['environment'].invoke if ENV.fetch('LOG_TO_STDOUT') { Rails.env.development? }.present? console = ActiveSupport::Logger.new(STDERR) - Rails.logger.extend ActiveSupport::Logger.broadcast console + if ::Rails.logger.respond_to?(:broadcast_to) + ::Rails.logger.broadcast_to(console) + else + Rails.logger.extend ActiveSupport::Logger.broadcast console + end end Telegram::Bot::UpdatesPoller.start(ENV['BOT'].try!(:to_sym) || :default) end desc 'Set webhook urls for all bots'