title: Log4j does not print stack trace
body: <p>I catch NullPointerException but log4j does not print stack trace, I aspect number of line of exception occurred etc. what is wrong?  </p>
  
  <p>My log</p>
  
  <pre><code>20110412-101042,317[ Timer-7][R] Exception while processing for value: abc.                  [xyz.Dummy]
  java.lang.NullPointerException
  </code></pre>
  
  <p><code>log4j.property</code> file</p>
  
  <pre><code>log4j.rootCategory=ERROR, logfile
  log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  log4j.appender.stdout.layout.ConversionPattern=%-5p %r [%t] : %m%n
  log4j.appender.logfile=org.apache.log4j.RollingFileAppender
  log4j.appender.logfile.File=my_application.log
  log4j.appender.logfile.Append=true
  log4j.appender.logfile.MaxBackupIndex =10
  log4j.appender.logFile.MaxFileSize=40000KB
  log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
  log4j.appender.logfile.layout.ConversionPattern=%d{yyyyMMdd-HHmmss,SSS}[%8.8t][%.1p] %-70m[%c{2}]%n
  </code></pre>
  
  <p>My snippet code</p>
  
  <pre><code>String value;
  try {
     value = "abc";
     //... lots for code
  }catch(Exception e) {
     logger.error("Exception while processing for value: " + value + ". ", e);
  }
  </code></pre>