title: Rails: Logging the entire stack trace of an exception
body: <p>I have been trying to figure out the right way to log a stack trace. I came across <a href="https://stackoverflow.com/questions/228441/how-do-i-log-the-entire-trace-back-of-a-ruby-exception-using-the-default-rails-lo">this</a> link which states that <strong>logger.error $!, $!.backtrace</strong> is the way to go but that does not work for me <strong>log_error</strong> does. As per documentation I do not see how passing a second argument to the error method would work anyway because the ruby logger that rails uses only accepts a single argument.</p>
  
  <p>Strangely (or maybe not) the second argument is accepted without any interpreter complaints. However anything that I pass to it is ignored.</p>
  
  <p>Can anyone explain what I am missing? Any insight into what the second argument to error is for and what is eating it?</p>