title: In Java, how can I ensure all exceptions that are caught and logged provide a stacktrace in my system?
body: <p>I'd like to be able to prevent code like this from getting checked in to my code base:</p>
  
  <pre><code>catch (Exception e)
  {
     LOG.error( "DeleteDir of " + tempDir + " failed: " + e );
     throw e;
  }
  </code></pre>
  
  <p>This kind of logging only logs Exception.toString() and provides no other details that an operator may need, e.g. a stack trace.</p>
  
  <p>I want to enforce all catch-log blocks to do the following:</p>
  
  <pre><code>catch (Exception e)
  {
     LOG.error( "DeleteDir of " + tempDir + " failed: " + e, e );
     throw e;
  }
  </code></pre>
  
  <p>This way I can configure my underlying logging implementation to be as verbose (or as not) as desired.</p>
  
  <p>Are there any static analysis tools, or other strategies that do this?  I looked for a FindBugs check, but didn't find anything.</p>