|
Commons Logging to JBoss Logging 1.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.logging.LogFactory
org.apache.commons.logging.impl.JBossLogFactory
public class JBossLogFactory
An implementation of Apache Commons Logging LogFactory for JBoss Logging.
| 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 | |
|---|---|
JBossLogFactory()
|
|
| 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)
Construct (if necessary) and return a Log instance,
using the factory's current set of configuration attributes. |
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. |
| Methods inherited from class org.apache.commons.logging.LogFactory |
|---|
directGetContextClassLoader, getClassLoader, getContextClassLoader, getFactory, getLog, getLog, isDiagnosticsEnabled, logRawDiagnostic, newFactory, newFactory, objectId, release, releaseAll |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JBossLogFactory()
| Method Detail |
|---|
public Object getAttribute(String name)
LogFactorynull if there is no such attribute.
getAttribute in class LogFactoryname - Name of the attribute to returnpublic String[] getAttributeNames()
LogFactory
getAttributeNames in class LogFactory
public Log getInstance(Class clazz)
throws LogConfigurationException
LogFactorygetInstance(String) with it.
getInstance in class LogFactoryclazz - Class for which a suitable Log name will be derived
LogConfigurationException - if a suitable Log
instance cannot be returned
public Log getInstance(String name)
throws LogConfigurationException
LogFactoryLog instance,
using the factory's current set of configuration attributes.
NOTE - Depending upon the implementation of
the LogFactory you are using, the Log
instance 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.
getInstance in class LogFactoryname - Logical name of the Log instance to be
returned (the meaning of this name is only known to the underlying
org.apache.commons.logging implementation that is being wrapped)
LogConfigurationException - if a suitable Log
instance cannot be returnedpublic void release()
LogFactoryLog
instances 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)
LogFactory
removeAttribute in class LogFactoryname - Name of the attribute to remove
public void setAttribute(String name,
Object value)
LogFactorynull 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 attribute
|
Commons Logging to JBoss Logging 1.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||