Sha256: 480e02e041cafbf57cd1e541d6fd7b4b3d13803a96585f92eba2032eaf0058eb
Contents?: true
Size: 800 Bytes
Versions: 9
Compression:
Stored size: 800 Bytes
Contents
# frozen_string_literal: true require "rails/rack/logger" # For rails > 3, drop rack Started message to debug level message # For rails == 3, patch the logger to remove the log lines # that say: 'Started GET / for 192.168.2.1...' class Rails::Rack::Logger # rubocop:disable ClassAndModuleChildren if Rails::VERSION::MAJOR == 3 && ::Sapience.config.silent_rack def call_app(*args) env = args.last @app.call(env) ensure ActiveSupport::LogSubscriber.flush_all! end end private module Extensions def info(*args, &block) debug(*args, &block) end def info? debug? end end alias orig_logger logger def logger @logger ||= begin logger = Sapience["Rails"] logger.extend(Extensions) logger end end end
Version data entries
9 entries across 9 versions & 1 rubygems