public final class ProviderUtil extends Object
Providers. When integrating with an application container framework, any Log4j Providers not accessible through standard classpath scanning should
loadProvider(java.net.URL, ClassLoader) a classpath accordingly.
| Modifier and Type | Field and Description |
|---|---|
protected static String |
PROVIDER_RESOURCE
Resource name for a Log4j 2 provider properties file.
|
protected static Collection |
PROVIDERS
Loaded providers.
|
protected static Lock |
STARTUP_LOCK
Guards the ProviderUtil singleton instance from lazy initialization.
|
| Modifier and Type | Method and Description |
|---|---|
static ClassLoader |
findClassLoader()
|
static Iterable |
getProviders()
|
static boolean |
hasProviders()
|
protected static void |
lazyInit()
Lazily initializes the ProviderUtil singleton.
|
protected static void |
loadProvider(URL
Loads an individual Provider implementation.
|
protected static void |
loadProviders(Enumeration
Deprecated.
Use
loadProvider(java.net.URL, ClassLoader) instead. Will be removed in 3.0.
|
protected static final StringPROVIDER_RESOURCE
protected static final Collection<Provider > PROVIDERS
protected static final LockSTARTUP_LOCK
protected static void loadProvider(URLurl, ClassLoader cl)
url - the URL to the provider properties file
cl - the ClassLoader to load the provider classes with
@Deprecated protected static void loadProviders(Enumeration<URL > urls, ClassLoader cl)
loadProvider(java.net.URL, ClassLoader) instead. Will be removed in 3.0.
public static boolean hasProviders()
protected static void lazyInit()
public static ClassLoaderfindClassLoader()