Sha256: a03b08fb934dc7cc26ffb63dbc9e797e47cfc130fd8059e7fb02dd329382b0e5

Contents?: true

Size: 330 Bytes

Versions: 11

Compression:

Stored size: 330 Bytes

Contents

# frozen_string_literal: true

module IsThisUsed
  module Util
    class LogSuppressor
      def self.suppress_logging
        initial_log_level = ActiveRecord::Base.logger.level
        ActiveRecord::Base.logger.level = :error
        yield
        ActiveRecord::Base.logger.level = initial_log_level
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
is_this_used-0.1.13 lib/is_this_used/util/log_suppressor.rb
is_this_used-0.1.12 lib/is_this_used/util/log_suppressor.rb
is_this_used-0.1.11 lib/is_this_used/util/log_suppressor.rb
is_this_used-0.1.10 lib/is_this_used/util/log_suppressor.rb
is_this_used-0.1.9 lib/is_this_used/util/log_suppressor.rb
is_this_used-0.1.8 lib/is_this_used/util/log_suppressor.rb
is_this_used-0.1.7 lib/is_this_used/util/log_suppressor.rb
is_this_used-0.1.5 lib/is_this_used/util/log_suppressor.rb
is_this_used-0.1.4 lib/is_this_used/util/log_suppressor.rb
is_this_used-0.1.3 lib/is_this_used/util/log_suppressor.rb
is_this_used-0.1.2 lib/is_this_used/util/log_suppressor.rb