title: log4j2 Unable to register shutdown hook because JVM is shutting down
body: <p>I'm trying to use log4j2 in a tomcat based web application, so I added log4j web module along with other essential jars. However when stopping this web application I'm getting the following exception. </p>
  
  <pre><code>FATAL Unable to register shutdown hook because JVM is shutting down
  </code></pre>
  
  <p>Why I'm getting this error and what I can do to prevent this error ?</p>
  
  <p>Thanks!</p>