mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 14:30:45 +08:00
bump log level to debug download issues
This commit is contained in:
parent
4f0fee1ce7
commit
dd07094bd7
|
@ -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?)$/) { "<img src='#{url}'>#{$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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user