org.apache.commons.logging.impl
public final class Log4jFactory extends LogFactory
Deprecated: Per discussion on COMMONS-DEV, the behind-the-scenes use of this class as a proxy factory has been removed. For 1.0, you can still request it directly if you wish, but it doesn't really do anything useful, and will be removed in 1.1.
Concrete subclass of LogFactory specific to log4j.
Field Summary | |
---|---|
Hashtable | attributes
The configuration attributes for this LogFactory. |
Hashtable | instances |
Constructor Summary | |
---|---|
Log4jFactory() |
Method Summary | |
---|---|
Object | getAttribute(String name)
Return the configuration attribute with the specified name (if any),
or null if 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) |
void | release()
Release any internal references to previously created Log
instances 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. |
null
if there is no such attribute.
Parameters: name Name of the attribute to return
getInstance(String)
with it.
Parameters: clazz Class for which a suitable Log name will be derived
Throws: LogConfigurationException if a suitable Log
instance cannot be returned
Parameters: name Name of the attribute to remove
null
value is equivalent to calling
removeAttribute(name)
.
Parameters: name Name of the attribute to set value Value of the attribute to set, or null
to remove any setting for this attribute