instance method
add_silencer
Ruby on Rails 7.2.3
Since v2.3.18Signature
add_silencer(&block)
Adds a silencer from the block provided. If the silencer returns true for a given line, it will be excluded from the clean backtrace.
# Will reject all lines that include the word "puma", like "/gems/puma/server.rb" or "/app/my_puma_server/rb" backtrace_cleaner.add_silencer { |line| /puma/.match?(line) }
Parameters
-
blockblock
Source
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 92
def add_silencer(&block)
@silencers << block
end
Defined in activesupport/lib/active_support/backtrace_cleaner.rb line 92
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::BacktraceCleaner