com.arjuna.common.util.logging
Class LogFactory
java.lang.Object
com.arjuna.common.util.logging.LogFactory
public class LogFactory
- extends java.lang.Object
Factory for Logi18n
and LogNoi18n
objects.
LogFactory instantiates and returns different implementations of Logi18n and LogNoi18n according to
which logging subsystem is configured.
The LoggingEnvironmentBean.loggingFactory property supplies factory setup information which is used to
instantiate a LogFactoryInterface implementation, from which a LogInterface implementation is then obtained.
See the environment bean for factory config options and also log level settings.
The LogInterface impl provides access to the underlying logging system for our logging abstraction layer.
Logi18n and LogNoi18n implementations wrap the LogInterface impl and are passed back to the user code.
Note the assumption that the underlying log system is not i18n aware i.e. message internationalization is done
in the Logi18n impl before messages are passed to the LogInterface.
TODO: this model need revision so we can support i18n aware underlying loggers.
Note: Log subsystems are not configured through CLF but instead rely on their own configuration files for
the setup of eg. debug level, appenders, etc...
- Since:
- clf-2.0
- Version:
- $Revision: 2342 $ $Date: 2006-03-30 14:06:17 +0100 (Thu, 30 Mar 2006) $
- Author:
- Thomas Rischbeck
Method Summary |
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. |
static void |
initializeModuleLogger(java.lang.Class moduleLogger,
java.lang.String bundleName,
java.lang.String name)
|
static void |
reset()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogFactory
public LogFactory()
initializeModuleLogger
public static void initializeModuleLogger(java.lang.Class moduleLogger,
java.lang.String bundleName,
java.lang.String name)
getLogNoi18n
public static LogNoi18n getLogNoi18n(java.lang.String name)
- Convenience method to return a named logger, without the application
having to care about factories.
- Parameters:
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).
- Returns:
- a LogNoi18n instance
getLogi18n
public 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.
- Parameters:
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.
- Returns:
- a Logi18n instance
reset
public static void reset()