aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/quiet_opener.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/quiet_opener.rb b/lib/quiet_opener.rb
index a077ca323..11adfe402 100644
--- a/lib/quiet_opener.rb
+++ b/lib/quiet_opener.rb
@@ -5,7 +5,7 @@ def quietly_try_to_open(url)
begin
result = open(url).read.strip
rescue OpenURI::HTTPError, SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::EHOSTUNREACH
- logger.warn("Unable to open third-party URL #{url}")
+ Rails.logger.warn("Unable to open third-party URL #{url}")
result = ""
end
return result
@@ -22,12 +22,12 @@ def quietly_try_to_purge(host, url)
result_body = response.body
}
rescue OpenURI::HTTPError, SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::EHOSTUNREACH
- logger.warn("Unable to reach host #{host}")
+ Rails.logger.warn("Unable to reach host #{host}")
end
if result == "200"
- logger.info("Purged URL #{url} at #{host}: #{result}")
+ Rails.logger.info("Purged URL #{url} at #{host}: #{result}")
else
- logger.warn("Unable to purge URL #{url} at #{host}: status #{result}")
+ Rails.logger.warn("Unable to purge URL #{url} at #{host}: status #{result}")
end
return result
end