|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arjuna.common.util.logging.LogFactory
public class LogFactory
Factory for Log
objects.
LogFactory returns different subclasses of logger according to which logging subsystem is chosen. The
log system is selected through the property com.arjuna.common.utils.logger
.
Supported values for this property are:
jakarta
Jakarta Commons Logging (JCL). JCL can delegate to various other logging subsystems, such as:
LogFactory
ImplementationThe Logging Package APIs include a default LogFactory
implementation class (
org.apache.commons.logging.impl.LogFactoryImpl) that is selected if no
other implementation class name can be discovered. Its primary purpose is
to create (as necessary) and return Log instances
in response to calls to the getInstance()
method. The default
implementation uses the following rules:
Log
instance of the same name will be created.
Subsequent getInstance()
calls to the same
LogFactory
instance, with the same name or Class
parameter, will return the same Log
instance.Log
instance must be created, the default
LogFactory
implementation uses the following discovery
process is used:
org.apache.commons.logging.Log
(for backwards
compatibility to pre-1.0 versions of this API, an attribute
org.apache.commons.logging.log
is also consulted)..org.apache.commons.logging.Log
(for backwards
compatibility to pre-1.0 versions of this API, a system property
org.apache.commons.logging.log
is also consulted).LogFactory
class otherwise.Log
implementation class, passing the specified name as the single
argument to its constructor.
Field Summary | |
---|---|
static java.lang.String |
DEBUG_LEVEL
Deprecated. |
static java.lang.String |
FACILITY_LEVEL
Deprecated. |
static java.lang.String |
LOGGER_PROPERTY
Deprecated. |
static java.lang.String |
VISIBILITY_LEVEL
Deprecated. |
Constructor Summary | |
---|---|
LogFactory()
|
Method Summary | |
---|---|
static Logi18n |
getLogi18n(java.lang.Class clazz)
Convenience method to return a named logger, without the application having to care about factories. |
static Logi18n |
getLogi18n(java.lang.Class clazz,
java.lang.String resBundle)
Convenience method to return a named logger, without the application having to care about factories. |
static Logi18n |
getLogi18n(java.lang.String name)
Convenience method to return a named logger, without the application having to care about factories. |
static Logi18n |
getLogi18n(java.lang.String name,
java.lang.String resBundle)
Convenience method to return a named logger, without the application having to care about factories. |
static LogNoi18n |
getLogNoi18n(java.lang.String name)
Convenience method to return a named logger, without the application having to care about factories. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final java.lang.String LOGGER_PROPERTY
@Deprecated public static final java.lang.String DEBUG_LEVEL
@Deprecated public static final java.lang.String FACILITY_LEVEL
@Deprecated public static final java.lang.String VISIBILITY_LEVEL
Constructor Detail |
---|
public LogFactory()
Method Detail |
---|
public static LogNoi18n getLogNoi18n(java.lang.String name)
name
- 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).
public static Logi18n getLogi18n(java.lang.Class clazz)
clazz
- Class for which a log name will be derivedpublic static Logi18n getLogi18n(java.lang.String name)
name
- 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).
Note that name
is also used as the default resource bundle
associated with the logger (although an explicit resource bundle is not
required for the debugb, warnb, etc methods.
public static Logi18n getLogi18n(java.lang.Class clazz, java.lang.String resBundle)
clazz
- Class for which a log name will be derivedresBundle
- resource bundle to use for the loggerpublic static Logi18n getLogi18n(java.lang.String name, java.lang.String resBundle)
name
- 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)resBundle
- resource bundle associated with the returned logger.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |