silence_worker_status_logger.rb 232 B

123456789
  1. module SilencedLogger
  2. def call(env)
  3. return super(env) if env['PATH_INFO'] !~ %r{^/worker_status}
  4. Rails.logger.silence(Logger::ERROR) do
  5. super(env)
  6. end
  7. end
  8. end
  9. Rails::Rack::Logger.send(:prepend, SilencedLogger)