From the Rails Debugging Guide, I found that I can customize the output for my log files using this simple method:
logger.debug "Person attributes hash: #{@person.attributes.inspect}"
I decided to use this to track how a variable changes and passes flow control.
I would like to be able to see the line number of my code where the logger#debug method was called. Something like that:
logger.debug "Person attributes hash: #{@person.attributes.inspect} from line #{LINE_NUMBER_VAR}"
source share