Package org.apache.commons.logging.impl
Class JBossLogFactory
java.lang.Object
org.apache.commons.logging.LogFactory
org.apache.commons.logging.impl.JBossLogFactory
An implementation of Apache Commons Logging
LogFactory for JBoss Logging.- Author:
- James R. Perkins
-
Field Summary
Fields inherited from class org.apache.commons.logging.LogFactory
DIAGNOSTICS_DEST_PROPERTY, factories, FACTORY_DEFAULT, FACTORY_PROPERTIES, FACTORY_PROPERTY, HASHTABLE_IMPLEMENTATION_PROPERTY, nullClassLoaderFactory, PRIORITY_KEY, SERVICE_ID, TCCL_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) Return the configuration attribute with the specified name (if any), ornullif there is no such attribute.String[]Return an array containing the names of all currently defined configuration attributes.getInstance(Class clazz) Convenience method to derive a name from the specified class and callgetInstance(String)with it.getInstance(String name) Construct (if necessary) and return aLoginstance, using the factory's current set of configuration attributes.voidrelease()Release any internal references to previously createdLoginstances returned by this factory.voidremoveAttribute(String name) Remove any configuration attribute associated with the specified name.voidsetAttribute(String name, Object value) Set the configuration attribute with the specified name.Methods inherited from class org.apache.commons.logging.LogFactory
directGetContextClassLoader, getClassLoader, getContextClassLoader, getFactory, getLog, getLog, isDiagnosticsEnabled, logRawDiagnostic, newFactory, newFactory, objectId, release, releaseAll
-
Constructor Details
-
JBossLogFactory
public JBossLogFactory()
-
-
Method Details
-
getAttribute
Description copied from class:LogFactoryReturn the configuration attribute with the specified name (if any), ornullif there is no such attribute.- Specified by:
getAttributein classLogFactory- Parameters:
name- Name of the attribute to return
-
getAttributeNames
Description copied from class:LogFactoryReturn an array containing the names of all currently defined configuration attributes. If there are no such attributes, a zero length array is returned.- Specified by:
getAttributeNamesin classLogFactory
-
getInstance
Description copied from class:LogFactoryConvenience method to derive a name from the specified class and callgetInstance(String)with it.- Specified by:
getInstancein classLogFactory- Parameters:
clazz- Class for which a suitable Log name will be derived- Throws:
LogConfigurationException- if a suitableLoginstance cannot be returned
-
getInstance
Description copied from class:LogFactoryConstruct (if necessary) and return aLoginstance, using the factory's current set of configuration attributes.NOTE - Depending upon the implementation of the
LogFactoryyou are using, theLoginstance you are returned may or may not be local to the current application, and may or may not be returned again on a subsequent call with the same name argument.- Specified by:
getInstancein classLogFactory- Parameters:
name- Logical name of theLoginstance to be returned (the meaning of this name is only known to the underlying org.apache.commons.logging implementation that is being wrapped)- Throws:
LogConfigurationException- if a suitableLoginstance cannot be returned
-
release
public void release()Description copied from class:LogFactoryRelease any internal references to previously createdLoginstances 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.- Specified by:
releasein classLogFactory
-
removeAttribute
Description copied from class:LogFactoryRemove any configuration attribute associated with the specified name. If there is no such attribute, no action is taken.- Specified by:
removeAttributein classLogFactory- Parameters:
name- Name of the attribute to remove
-
setAttribute
Description copied from class:LogFactorySet the configuration attribute with the specified name. Calling this with anullvalue is equivalent to callingremoveAttribute(name).- Specified by:
setAttributein classLogFactory- Parameters:
name- Name of the attribute to setvalue- Value of the attribute to set, ornullto remove any setting for this attribute
-