From dd07094bd74a1b47c51d0925026d44def817e0e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Wed, 27 Sep 2017 23:26:07 +0200 Subject: [PATCH] bump log level to debug download issues --- app/jobs/regular/pull_hotlinked_images.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/jobs/regular/pull_hotlinked_images.rb b/app/jobs/regular/pull_hotlinked_images.rb index 1b97ef06ff7..4883068c1a0 100644 --- a/app/jobs/regular/pull_hotlinked_images.rb +++ b/app/jobs/regular/pull_hotlinked_images.rb @@ -53,14 +53,14 @@ module Jobs if upload.persisted? downloaded_urls[src] = upload.url else - log(:info, "Failed to pull hotlinked image for post: #{post_id}: #{src} - #{upload.errors.join("\n")}") + log(:error, "Failed to pull hotlinked image for post: #{post_id}: #{src} - #{upload.errors.join("\n")}") end else - log(:info, "Failed to pull hotlinked image for post: #{post_id}: #{src} - Image is bigger than #{@max_size}") + log(:error, "Failed to pull hotlinked image for post: #{post_id}: #{src} - Image is bigger than #{@max_size}") large_images << original_src end else - log(:info, "There was an error while downloading '#{src}' locally for post: #{post_id}") + log(:error, "There was an error while downloading '#{src}' locally for post: #{post_id}") broken_images << original_src end end @@ -87,7 +87,7 @@ module Jobs raw.gsub!(/^#{escaped_src}(\s?)$/) { "#{$1}" } end rescue => e - log(:info, "Failed to pull hotlinked image: #{src} post:#{post_id}\n" + e.message + "\n" + e.backtrace.join("\n")) + log(:error, "Failed to pull hotlinked image: #{src} post:#{post_id}\n" + e.message + "\n" + e.backtrace.join("\n")) end end