Class: MtkFramework::ActiveInteractionConcerns::Loggable::BacktraceCleaner

Inherits:
Rails::BacktraceCleaner
  • Object
show all
Defined in:
lib/mtk_framework/active_interaction_concerns/loggable.rb

Constant Summary collapse

APP_DIRS_PATTERN =
%r{^/?(app|config|lib|test|spec|\(\w*\))}.freeze
CURRENT_FILE =
__FILE__

Instance Method Summary collapse

Constructor Details

#initializeBacktraceCleaner

Returns a new instance of BacktraceCleaner.



71
72
73
74
75
76
# File 'lib/mtk_framework/active_interaction_concerns/loggable.rb', line 71

def initialize
  super
  remove_silencers!
  add_silencer { |line| !APP_DIRS_PATTERN.match?(line) }
  add_silencer { |line| line.include? current_file }
end