com.arjuna.common.util.logging
Class LogFactory

java.lang.Object
  extended by com.arjuna.common.util.logging.LogFactory

public class LogFactory
extends java.lang.Object

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:

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...

The Default LogFactory Implementation

The 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:

Since:
clf-2.0
Version:
$Revision: 2342 $ $Date: 2006-03-30 14:06:17 +0100 (Thu, 30 Mar 2006) $
Author:
Thomas Rischbeck

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

LOGGER_PROPERTY

@Deprecated
public static final java.lang.String LOGGER_PROPERTY
Deprecated. 
this is the name of a system property that can be used to explicitly select a particular logging subsystem. See the class description for supported values.

See Also:
Constant Field Values

DEBUG_LEVEL

@Deprecated
public static final java.lang.String DEBUG_LEVEL
Deprecated. 
Property names to control fine-grained logging TODO: TR: this requires some more thought. currently the values can only be set for the root logger, but some hierarchical scheme would be nice we might also want to explore dynamic proxies to automaticlaly obtain debug output for all methods & constructors, etc ...

See Also:
Constant Field Values

FACILITY_LEVEL

@Deprecated
public static final java.lang.String FACILITY_LEVEL
Deprecated. 
See Also:
Constant Field Values

VISIBILITY_LEVEL

@Deprecated
public static final java.lang.String VISIBILITY_LEVEL
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

LogFactory

public LogFactory()
Method Detail

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).


getLogi18n

public static Logi18n getLogi18n(java.lang.Class clazz)
Convenience method to return a named logger, without the application having to care about factories.

Parameters:
clazz - Class for which a log name will be derived

getLogi18n

public static Logi18n getLogi18n(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).

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.


getLogi18n

public 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.

Parameters:
clazz - Class for which a log name will be derived
resBundle - resource bundle to use for the logger

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.