title: How to report errors (Java using log4j), conveying information about an error
body: <p>I have seen a lot of information using log4j for logging errors and information but I have seen little information on what to actually put in a error report.</p>
  
  <p>I guess it depends on the domain, but what are your best practices for reporting an issue.</p>
  
  <p>If I am on a web application server, how do you normally log errors?</p>
  
  <p>I think just reporting the exception stack trace is a bad practice.</p>
  
  <p>So far, I normally include:</p>
  
  <ul>
  <li>Call calling class or method that generated the error. Some report</li>
  <li>error id (E.g. EID=0093) and then mapping the error id to some external documentation     </li>
  <li>Processing time at of error (if available, how
  long did the previous function call take to execute) </li>
  <li>Directory and file information.  If I am working with a file, I try to report the
  full path of the file in the event of file not found errors</li>
  </ul>