How to add the file name and line number in Rails\' log message? My current format is something like
[INFO : 12-09-27 10:12:30]
I want to chang
In case any one is looking for a similar solution for Rails 4. It would be:
class ActiveSupport::Logger::SimpleFormatter def call(severity, time, progname, msg) "[#{severity} #{time} #{caller(0).first.match(/.*:\d+/)[0]}] #{msg}\n" end end