Ignore the reset() call from java.util.logging.LogManager.Cleaner,
because we have our own shutdown hook that will take care.
There are three hooks that run at VM shutdown:
1. j.u.l.LogManager.Cleaner
2. o.a.j.ClassLoaderLogManager.Cleaner
3. o.a.c.startup.Catalina.CatalinaShutdownHook
2. vs. 3. was taken care by r910974 and r918594. This takes care of 1. vs. (2.,3.)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@918885
13f79535-47bb-0310-9956-
ffa450edef68
@Override
public void reset() throws SecurityException {
- ClassLoader classLoader = Thread.currentThread()
- .getContextClassLoader();
+ Thread thread = Thread.currentThread();
+ if (thread.getClass().getName().startsWith(
+ "java.util.logging.LogManager$")) {
+ // Ignore the call from java.util.logging.LogManager.Cleaner,
+ // because we have our own shutdown hook
+ return;
+ }
+ ClassLoader classLoader = thread.getContextClassLoader();
ClassLoaderLogInfo clLogInfo = getClassLoaderInfo(classLoader);
resetLoggers(clLogInfo);
super.reset();