if (shutdownThread != null) {
Runtime.getRuntime().removeShutdownHook(shutdownThread);
shutdownThread = null;
}
final Configuration prev = config;
config = new NullConfiguration();
updateLoggers();
prev.stop();
externalContext = null;
LogManager.getFactory().removeContext(this);
status = Status.STOPPED;