Module: Cookpad::Performance::DisableCachedQueryLogging

Defined in:
lib/cookpad/performance/disable_cached_query_logging.rb

Constant Summary collapse

CACHE_REGEXP =
/\[36mCACHE\s[\w:]+\s(Load|Pluck)+/.freeze

Instance Method Summary collapse

Instance Method Details

#add(severity, message = nil, progname = nil, &block) ⇒ Object



6
7
8
9
10
# File 'lib/cookpad/performance/disable_cached_query_logging.rb', line 6

def add(severity, message = nil, progname = nil, &block)
  super if progname.nil? || !progname&.match?(CACHE_REGEXP)

  # :noop:
end