|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.logging.LogFactory net.sf.mmapps.commons.logging.impl.MMBaseLoggingFactory
LogFactory for jakarta commons-logging who when used creates MMBase logging backed Log implementations.
Goal: To provide a single log configuration for applications that use both commons-logging and mmbase logging.
Achievement: By providing a commons-logging factory that uses mmbase-logging.
MMBaseLoggingFactory is a LogFactory for the jakarta commons-logging logging api.
MMBaseLoggingFactory uses the MMBase logging mechanism found in org.mmbase.util.logging.Logging
to provide the actual logging.
Field Summary |
Fields inherited from class org.apache.commons.logging.LogFactory |
factories, FACTORY_DEFAULT, FACTORY_PROPERTIES, FACTORY_PROPERTY, SERVICE_ID |
Constructor Summary | |
MMBaseLoggingFactory()
|
Method Summary | |
java.lang.Object |
getAttribute(java.lang.String name)
|
java.lang.String[] |
getAttributeNames()
|
org.apache.commons.logging.Log |
getInstance(java.lang.Class clazz)
This method first first looks in it's internal cache if there is a existing Log for the given class. |
org.apache.commons.logging.Log |
getInstance(java.lang.String category)
This method first first looks in it's internal cache if there is a existing Log with the given name. |
void |
release()
Release any internal references to previously created Log
instances returned by this factory. |
void |
removeAttribute(java.lang.String name)
Remove any configuration attribute associated with the specified name. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Set the configuration attribute with the specified name. |
Methods inherited from class org.apache.commons.logging.LogFactory |
getContextClassLoader, getFactory, getLog, getLog, newFactory, release, releaseAll |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MMBaseLoggingFactory()
Method Detail |
public java.lang.Object getAttribute(java.lang.String name)
name
- Name of the attribute to return
null
if there is no such attribute.public java.lang.String[] getAttributeNames()
public org.apache.commons.logging.Log getInstance(java.lang.Class clazz) throws org.apache.commons.logging.LogConfigurationException
MMBase17Logger
or a MMBase18Logger
;
clazz
- the class for witch to create a logger
org.apache.commons.logging.LogConfigurationException
public org.apache.commons.logging.Log getInstance(java.lang.String category) throws org.apache.commons.logging.LogConfigurationException
MMBase17Logger
or a MMBase18Logger
;
org.apache.commons.logging.LogConfigurationException
public void release()
Log
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.
public void removeAttribute(java.lang.String name)
name
- Name of the attribute to removepublic void setAttribute(java.lang.String name, java.lang.Object value)
null
value is equivalent to calling
removeAttribute(name)
.
name
- Name of the attribute to setvalue
- Value of the attribute to set, or null
to remove any setting for this attribute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |