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 |
|---|---|
| private static final String | |
| private static final String[] | |
| private static volatile ProviderUtil | |
| private static final Logger | |
| pack-priv static final String | PROVIDER_RESOURCE
Resource name for a Log4j 2 provider properties file. |
| pack-priv static final Collection | PROVIDERS
Loaded providers. |
| pack-priv static final Lock | STARTUP_LOCK
Guards the ProviderUtil singleton instance from lazy initialization. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | |
| public static ClassLoader | |
| public static Iterable | |
| public static boolean | |
| pack-priv static void | |
| pack-priv static void | loadProvider(final URL
the URL to the provider properties file url, final ClassLoader the ClassLoader to load the provider classes with cl)Loads an individual Provider implementation. |
| pack-priv static void | |
| pack-priv static void | loadProviders(final Enumeration<URL> urls, final ClassLoader cl)
Deprecated
Use
loadProvider(java. instead. Will be removed in 3.0.
|
| private static boolean |
| API_VERSION | back to summary |
|---|---|
| private static final String API_VERSION | |
| COMPATIBLE_API_VERSIONS | back to summary |
|---|---|
| private static final String[] COMPATIBLE_API_VERSIONS | |
| instance | back to summary |
|---|---|
| private static volatile ProviderUtil instance | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| PROVIDER_RESOURCE | back to summary |
|---|---|
| pack-priv static final String PROVIDER_RESOURCE Resource name for a Log4j 2 provider properties file. | |
| PROVIDERS | back to summary |
|---|---|
| pack-priv static final Collection<Provider> PROVIDERS Loaded providers. | |
| STARTUP_LOCK | back to summary |
|---|---|
| pack-priv static final Lock STARTUP_LOCK Guards the ProviderUtil singleton instance from lazy initialization. This is primarily used for OSGi support.
| |
| ProviderUtil | back to summary |
|---|---|
| private ProviderUtil() | |
| addProvider | back to summary |
|---|---|
| pack-priv static void addProvider(final Provider provider) | |
| findClassLoader | back to summary |
|---|---|
| public static ClassLoader findClassLoader() | |
| getProviders | back to summary |
|---|---|
| public static Iterable | |
| hasProviders | back to summary |
|---|---|
| public static boolean hasProviders() | |
| lazyInit | back to summary |
|---|---|
| pack-priv static void lazyInit() Lazily initializes the ProviderUtil singleton.
| |
| loadProvider | back to summary |
|---|---|
| pack-priv static void loadProvider(final URL url, final ClassLoader cl) Loads an individual Provider implementation. This method is really only useful for the OSGi bundle activator and this class itself.
| |
| loadProviders | back to summary |
|---|---|
pack-priv static void loadProviders(final ClassLoader classLoader)
| |
| loadProviders | back to summary |
|---|---|
| pack-priv static void loadProviders(final Enumeration<URL> urls, final ClassLoader cl)
Deprecated Use
| |
| validVersion | back to summary |
|---|---|
| private static boolean validVersion(final String version) | |