public class SLF4JLogFactory extends LogFactory
 Concrete subclass of LogFactory which always delegates to the
 org.slf4j.LoggerFactory class.
 
 
 This factory generates instances of SLF4JLog. It will remember
 previously created instances for the same name, and will return them on
 repeated requests to the getInstance() method.
 
 
This implementation ignores any configured attributes.
| Modifier and Type | Field and Description | 
|---|---|
| protected Hashtable | attributesConfiguration attributes. | 
| static String | LOG_PROPERTYThe name of the system property identifying our  Logimplementation
 class. | 
DIAGNOSTICS_DEST_PROPERTY, factories, FACTORY_DEFAULT, FACTORY_PROPERTIES, FACTORY_PROPERTY, HASHTABLE_IMPLEMENTATION_PROPERTY, nullClassLoaderFactory, PRIORITY_KEY, SERVICE_ID, TCCL_KEY| Constructor and Description | 
|---|
| SLF4JLogFactory()Public no-arguments constructor required by the lookup mechanism. | 
| Modifier and Type | Method and Description | 
|---|---|
| Object | getAttribute(String name)Return the configuration attribute with the specified name (if any), or
  nullif there is no such attribute. | 
| String[] | getAttributeNames()Return an array containing the names of all currently defined configuration
 attributes. | 
| Log | getInstance(Class clazz)Convenience method to derive a name from the specified class and call
  getInstance(String)with it. | 
| Log | getInstance(String name)
 Construct (if necessary) and return a  Loginstance, using
 the factory's current set of configuration attributes. | 
| void | release()Release any internal references to previously created
  Loginstances returned by this factory. | 
| void | removeAttribute(String name)Remove any configuration attribute associated with the specified name. | 
| void | setAttribute(String name,
            Object value)Set the configuration attribute with the specified name. | 
createFactory, directGetContextClassLoader, getClassLoader, getContextClassLoader, getFactory, getLog, getLog, isDiagnosticsEnabled, logRawDiagnostic, newFactory, newFactory, objectId, release, releaseAllpublic static final String LOG_PROPERTY
Logimplementation
 class.protected Hashtable attributes
public SLF4JLogFactory()
public Object getAttribute(String name)
null if there is no such attribute.getAttribute in class LogFactoryname - Name of the attribute to returnpublic String[] getAttributeNames()
getAttributeNames in class LogFactorypublic Log getInstance(Class clazz) throws LogConfigurationException
getInstance(String) with it.getInstance in class LogFactoryclazz - Class for which a suitable Log name will be derivedLogConfigurationException - if a suitable Log instance cannot be returnedpublic Log getInstance(String name) throws LogConfigurationException
 Construct (if necessary) and return a Log instance, using
 the factory's current set of configuration attributes.
 
getInstance in class LogFactoryname - Logical name of the Log instance to be returned
          (the meaning of this name is only known to the underlying logging
          implementation that is being wrapped)LogConfigurationException - if a suitable Log instance cannot be returnedpublic void release()
Loginstances returned by this factory.
 This is useful in environments like servlet containers, which implement
 application reloading by throwing away a ClassLoader. Dangling references
 to objects in that class loader would prevent garbage collection.release in class LogFactorypublic void removeAttribute(String name)
removeAttribute in class LogFactoryname - Name of the attribute to removepublic void setAttribute(String name, Object value)
null value is equivalent to calling
 removeAttribute(name).setAttribute in class LogFactoryname - Name of the attribute to setvalue - Value of the attribute to set, or null to remove
          any setting for this attributeCopyright © 2005–2019 QOS.ch. All rights reserved.