From a0fc8bd924e4c8045d08b7534df12465c7f5b8de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Fri, 17 Nov 2017 15:38:26 +0100 Subject: [PATCH] don't log 404s to gravatar.com --- lib/final_destination.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/final_destination.rb b/lib/final_destination.rb index ed821d2465d..84890fe00ba 100644 --- a/lib/final_destination.rb +++ b/lib/final_destination.rb @@ -253,6 +253,9 @@ class FinalDestination end def log(log_level, message) + # blacklist 404 on gravatar.com + return if @status_code = 404 && @uri.hostname["gravatar.com"] + Rails.logger.public_send( log_level, "#{RailsMultisite::ConnectionManagement.current_db}: #{message}"