Package org.apache.logging.log4j.spi
Class Provider
- java.lang.Object
- 
- org.apache.logging.log4j.spi.Provider
 
- 
 public class Provider extends Object Model class for a Log4j 2 provider. The properties in this class correspond to the properties used in aMETA-INF/log4j-provider.propertiesfile. Note that this class is automatically created by Log4j and should not be used by providers.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringFACTORY_PRIORITYProperty name to set for a Log4j 2 provider to specify the priority of this implementation.static StringLOGGER_CONTEXT_FACTORYProperty name to set to the implementation ofLoggerContextFactory.static StringTHREAD_CONTEXT_MAPProperty name to set to the implementation ofThreadContextMap.
 - 
Constructor SummaryConstructors 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)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetClassName()Gets the class name of theLoggerContextFactoryimplementation of this Provider.IntegergetPriority()Gets the priority (natural ordering) of this Provider.StringgetThreadContextMap()Gets the class name of theThreadContextMapimplementation of this Provider.URLgetUrl()Gets the URL containing this Provider's Log4j details.StringgetVersions()Returns the Log4j API versions supported by the implementation.inthashCode()Class<? extends LoggerContextFactory>loadLoggerContextFactory()Loads theLoggerContextFactoryclass specified by this Provider.Class<? extends ThreadContextMap>loadThreadContextMap()Loads theThreadContextMapclass specified by this Provider.StringtoString()
 
- 
- 
- 
Field Detail- 
FACTORY_PRIORITYpublic static final String FACTORY_PRIORITY Property name to set for a Log4j 2 provider to specify the priority of this implementation.- See Also:
- Constant Field Values
 
 - 
THREAD_CONTEXT_MAPpublic static final String THREAD_CONTEXT_MAP Property name to set to the implementation ofThreadContextMap.- See Also:
- Constant Field Values
 
 - 
LOGGER_CONTEXT_FACTORYpublic static final String LOGGER_CONTEXT_FACTORY Property name to set to the implementation ofLoggerContextFactory.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
Providerpublic Provider(Properties props, URL url, ClassLoader classLoader) 
 - 
Providerpublic Provider(Integer priority, String versions, Class<? extends LoggerContextFactory> loggerContextFactoryClass) 
 - 
Providerpublic Provider(Integer priority, String versions, Class<? extends LoggerContextFactory> loggerContextFactoryClass, Class<? extends ThreadContextMap> threadContextMapClass) 
 
- 
 - 
Method Detail- 
getVersionspublic String getVersions() Returns the Log4j API versions supported by the implementation.- Returns:
- A String containing the Log4j versions supported.
 
 - 
getPrioritypublic Integer getPriority() Gets the priority (natural ordering) of this Provider.- Returns:
- the priority of this Provider
 
 - 
getClassNamepublic String getClassName() Gets the class name of theLoggerContextFactoryimplementation of this Provider.- Returns:
- the class name of a LoggerContextFactory implementation
 
 - 
loadLoggerContextFactorypublic Class<? extends LoggerContextFactory> loadLoggerContextFactory() Loads theLoggerContextFactoryclass specified by this Provider.- Returns:
- the LoggerContextFactory implementation class or nullif there was an error loading it
 
 - 
getThreadContextMappublic String getThreadContextMap() Gets the class name of theThreadContextMapimplementation of this Provider.- Returns:
- the class name of a ThreadContextMap implementation
 
 - 
loadThreadContextMappublic Class<? extends ThreadContextMap> loadThreadContextMap() Loads theThreadContextMapclass specified by this Provider.- Returns:
- the ThreadContextMap implementation class or nullif there was an error loading it
 
 - 
getUrlpublic URL getUrl() Gets the URL containing this Provider's Log4j details.- Returns:
- the URL corresponding to the Provider META-INF/log4j-provider.propertiesfile
 
 
- 
 
-