} catch (final Exception ex) {
LOGGER.error("Unable to create configured LoggerContextFactory {}", threadContextMapName, ex);
}
}
if (contextMap == null && ProviderUtil.hasProviders()) {
final LoggerContextFactory factory = LogManager.getFactory();
for (final Provider provider : ProviderUtil.getProviders()) {
threadContextMapName = provider.getThreadContextMap();
final String factoryClassName = provider.getClassName();
if (threadContextMapName != null && factory.getClass().getName().equals(factoryClassName)) {
try {
final Class<?> clazz = cl.loadClass(threadContextMapName);
if (ThreadContextMap.class.isAssignableFrom(clazz)) {
contextMap = (ThreadContextMap) clazz.newInstance();
break;