I am working on rails project and I am trying to get exceptions to be logged to the rails log files. I know I can call logger.error $! to get the first line of the
logger.error $!
logger.error caller.join("\n") should do the trick.
logger.error caller.join("\n")