title: How to print stack trace in log file
body: <p>I am loging error im my java swing application:             <code>logger.error("ERROR: " + ex);</code> where ex is exception</p>
  
  <p>this just print me <code>13:33:58,964 ERROR PlayOffPanel:292 - ERROR: java.lang.NullPointerException</code></p>
  
  <p>but I wanna know stacktrace.</p>
  
  <p>my log4j properites:</p>
  
  <pre><code>log4j.rootLogger=DEBUG,file
  
  log4j.appender.file=org.apache.log4j.RollingFileAppender
  log4j.appender.file.maxFileSize=100KB
  log4j.appender.file.maxBackupIndex=5
  log4j.appender.file.File=error.log
  log4j.appender.file.threshold=DEBUG
  log4j.appender.file.layout=org.apache.log4j.PatternLayout
  log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
  </code></pre>