Class Provider


  • public class Provider
    extends Object
    Model class for a Log4j 2 provider. The properties in this class correspond to the properties used in a META-INF/log4j-provider.properties file. Note that this class is automatically created by Log4j and should not be used by providers.
    • Method Detail

      • getVersions

        public String getVersions()
        Returns the Log4j API versions supported by the implementation.
        Returns:
        A String containing the Log4j versions supported.
      • getPriority

        public Integer getPriority()
        Gets the priority (natural ordering) of this Provider.
        Returns:
        the priority of this Provider
      • getClassName

        public String getClassName()
        Gets the class name of the LoggerContextFactory implementation of this Provider.
        Returns:
        the class name of a LoggerContextFactory implementation
      • loadLoggerContextFactory

        public Class<? extends LoggerContextFactory> loadLoggerContextFactory()
        Loads the LoggerContextFactory class specified by this Provider.
        Returns:
        the LoggerContextFactory implementation class or null if there was an error loading it
      • getThreadContextMap

        public String getThreadContextMap()
        Gets the class name of the ThreadContextMap implementation of this Provider.
        Returns:
        the class name of a ThreadContextMap implementation
      • loadThreadContextMap

        public Class<? extends ThreadContextMap> loadThreadContextMap()
        Loads the ThreadContextMap class specified by this Provider.
        Returns:
        the ThreadContextMap implementation class or null if there was an error loading it
      • getUrl

        public URL getUrl()
        Gets the URL containing this Provider's Log4j details.
        Returns:
        the URL corresponding to the Provider META-INF/log4j-provider.properties file
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object