diff --git a/lib/logstash/monkeypatches-for-debugging.rb b/lib/logstash/monkeypatches-for-debugging.rb new file mode 100644 index 000000000..2c0ea6d79 --- /dev/null +++ b/lib/logstash/monkeypatches-for-debugging.rb @@ -0,0 +1,10 @@ +if $DEBUGLIST.include?("require") + module Kernel + alias_method :require_debug, :require + + def require(path) + puts "require(\"#{path}\")" + return require_debug(path) + end + end +end diff --git a/lib/logstash/runner.rb b/lib/logstash/runner.rb index 495560562..54eb1ba3a 100644 --- a/lib/logstash/runner.rb +++ b/lib/logstash/runner.rb @@ -38,6 +38,7 @@ end require "logstash/monkeypatches-for-performance" require "logstash/monkeypatches-for-bugs" +require "logstash/monkeypatches-for-debugging" require "logstash/namespace" require "logstash/program" require "i18n" # gem 'i18n'