Skip to content

Instantly share code, notes, and snippets.

@alsor
Created July 24, 2012 09:40
Show Gist options
  • Save alsor/3169123 to your computer and use it in GitHub Desktop.
Save alsor/3169123 to your computer and use it in GitHub Desktop.
Tracing method invocations in ruby
#AMQP.logging = true
#set_trace_func proc { |event, file, line, id, binding, classname|
# if event == "call" && ((file.include?("lib/amqp") &&
# !file.include?("lib/amqp/buffer") &&
# #!file.include?("lib/amqp/frame") &&
# !file.include?("lib/amqp/spec")) ||
# file.include?("eventmachine"))
# printf "from %-130s\t%8s\t%-25s:%-4d\t%s\n", caller[2], event, File.basename(file), line, id
# end
#}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment