<p>
<code>Throwable.printStackTrace(...)</code> prints a throwable and its stack trace to some stream.
</p>

<p>Loggers should be used instead to print throwables, as they have many advantages:</p>
<ul>
  <li>Users are able to easily retrieve the logs.</li>
  <li>The format of log messages is uniform and allow users to browse the logs easily.</li>
</ul>

<p>The following code:</p>

<pre>
try {
  /* ... */
} catch(Exception e) {
  e.printStackTrace();        // Non-Compliant
}
</pre>

<p>should be refactored into:</p>

<pre>
try {
  /* ... */
} catch(Exception e) {
  LOGGER.log("context", e);   // Compliant
}
</pre>