I am using Ruby on Rails 3.2.2 and I use logger.warn
in my code to display warning messages for development purposes. I would like to get the name of the method this logger.warn
to print this method name to the log file.
class ClassName < ActiveRecord::Base def method_name
In the log file, I would like to see:
I would like to get and display ClassName # method_name
Is it possible? If so, how to do it?
source share