Logging local & instance variables when exceptions occur in Ruby
With hard-to-reproduce bugs, it can be really handy to log all of the local and instance variables along with the exception. This post shows you how. Along the way we’ll introduce Ruby’s binding system as well as the binding_of_caller gem - a powerful tool for introspection. http://blog.honeybadger.io/log-local-variables-and-instance-variables-when-exceptions-occur-in-ruby/
Post a comment