From b338fe0efcb7e7b8106e7fe85aec1f5afb2681f6 Mon Sep 17 00:00:00 2001 From: Guillaume Lazzara Date: Wed, 6 Jul 2016 10:06:28 +0200 Subject: [PATCH] Silent logs of ping rendering --- app/controllers/ping_controller.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/ping_controller.rb b/app/controllers/ping_controller.rb index 8f5b11857..361adb56c 100644 --- a/app/controllers/ping_controller.rb +++ b/app/controllers/ping_controller.rb @@ -1,10 +1,12 @@ class PingController < ApplicationController def index - if (ActiveRecord::Base.connected?) - render nothing: true, status: 200, content_type: "application/json" - else - render nothing: true, status: 500, content_type: "application/json" + Rails.logger.silence do + if (ActiveRecord::Base.connected?) + render nothing: true, status: 200, content_type: "application/json" + else + render nothing: true, status: 500, content_type: "application/json" + end end end