title: Tomcat memory leak issue of log4j2 thread
body: <p>I'm using log4j2 for logging, tomcat8 and java8 version.
  I used attribute "monitorInterval" to periodically check my log4j2.xml.
  During shutdown my tomcat i'm facing issue of memory leak.How to resolve this memory leak issue?</p>
  
  <p>Below are the catalina logs:</p>
  
  <blockquote>
    <p>06-Oct-2016 15:13:55.927 WARNING [localhost-startStop-2]
    org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads
    The web application [mywebapp] appears to have started
    a thread named [Log4j2-Log4j2Scheduled-1] but has failed to stop it.
    This is very likely to create a memory leak. Stack trace of thread: 
    sun.misc.Unsafe.park(Native Method) 
    java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
    java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
    java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
    java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    java.lang.Thread.run(Thread.java:745)</p>
  </blockquote>
  
  <p>Thanks in advance.</p>
  
  <p>Updated:
  I analysed my logs, actually logger context is initilising again once Log4jServletContextListener is destroying..</p>
  
  <blockquote>
    <p>2016-10-22 13:49:36,347 localhost-startStop-2 DEBUG
    Log4jServletContextListener ensuring that Log4j shuts down properly.
    2016-10-22 13:49:36,382 localhost-startStop-2 DEBUG Starting
    LoggerContext[name=bb4719,
    org.apache.logging.log4j.core.LoggerContext@d77214]...</p>
  </blockquote>
  
  <p>Actually in my application i'm using spring ContextLoaderListner in web.xml, so it may using logging internally while destroying spring listner.</p>
  
  <p>Thanks</p>