add_silencer(&block) public

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) }
Show source
Register or log in to add new notes.