Log4jProvider
, SLF4JProvider
public class Provider extends Object
META-INF/log4j-provider.properties
file. Note that this class is automatically created by Log4j and should
not be used by providers.Modifier and Type | Field | Description |
---|---|---|
static String |
FACTORY_PRIORITY |
Property name to set for a Log4j 2 provider to specify the priority of this implementation.
|
static String |
LOGGER_CONTEXT_FACTORY |
Property name to set to the implementation of
LoggerContextFactory . |
static String |
THREAD_CONTEXT_MAP |
Property name to set to the implementation of
ThreadContextMap . |
Constructor | Description |
---|---|
Provider(Integer priority,
String versions,
Class<? extends LoggerContextFactory> loggerContextFactoryClass) |
|
Provider(Integer priority,
String versions,
Class<? extends LoggerContextFactory> loggerContextFactoryClass,
Class<? extends ThreadContextMap> threadContextMapClass) |
|
Provider(Properties props,
URL url,
ClassLoader classLoader) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(Object o) |
|
String |
getClassName() |
Gets the class name of the
LoggerContextFactory implementation of this
Provider. |
Integer |
getPriority() |
Gets the priority (natural ordering) of this Provider.
|
String |
getThreadContextMap() |
Gets the class name of the
ThreadContextMap implementation of this Provider. |
URL |
getUrl() |
Gets the URL containing this Provider's Log4j details.
|
String |
getVersions() |
Returns the Log4j API versions supported by the implementation.
|
int |
hashCode() |
|
Class<? extends LoggerContextFactory> |
loadLoggerContextFactory() |
Loads the
LoggerContextFactory class specified by this Provider. |
Class<? extends ThreadContextMap> |
loadThreadContextMap() |
Loads the
ThreadContextMap class specified by this Provider. |
String |
toString() |
public static final String FACTORY_PRIORITY
public static final String THREAD_CONTEXT_MAP
ThreadContextMap
.public static final String LOGGER_CONTEXT_FACTORY
LoggerContextFactory
.public Provider(Properties props, URL url, ClassLoader classLoader)
public Provider(Integer priority, String versions, Class<? extends LoggerContextFactory> loggerContextFactoryClass)
public Provider(Integer priority, String versions, Class<? extends LoggerContextFactory> loggerContextFactoryClass, Class<? extends ThreadContextMap> threadContextMapClass)
public String getVersions()
public Integer getPriority()
public String getClassName()
LoggerContextFactory
implementation of this
Provider.public Class<? extends LoggerContextFactory> loadLoggerContextFactory()
LoggerContextFactory
class specified by this Provider.null
if there was an error loading itpublic String getThreadContextMap()
ThreadContextMap
implementation of this Provider.public Class<? extends ThreadContextMap> loadThreadContextMap()
ThreadContextMap
class specified by this Provider.null
if there was an error loading itpublic URL getUrl()
META-INF/log4j-provider.properties
fileCopyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.