com.rhi.architecture.logging
Class LogFactory

java.lang.Object
  extended bycom.rhi.architecture.logging.LogFactory
All Implemented Interfaces:
Resource
Direct Known Subclasses:
BasicLog4JFactory, DefaultLogFactory, JDK14LogFactory

public abstract class LogFactory
extends java.lang.Object
implements Resource

LogFactory - create Factory for a certain logging library.

Version:
1.0
Author:
Pete McKinstry

Field Summary
static java.lang.String KEY
          key used by ResourceContext to find LogFactory type & used by clients to retrieve the currently loaded LogFactory.
 
Constructor Summary
LogFactory()
           
 
Method Summary
abstract  Logger getDefaultLogger()
          Get default logger.
static LogFactory getFactory(java.lang.String factoryImpl)
          Get a LogFactory based on the implementation class name provided as a parameter.
 Logger getLogger(java.lang.Class type)
          Get a logger instance for the provided type.
abstract  Logger getLogger(java.lang.String type)
          Get a logger instance for the provided type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.rhi.architecture.resource.Resource
close, init
 

Field Detail

KEY

public static final java.lang.String KEY
key used by ResourceContext to find LogFactory type & used by clients to retrieve the currently loaded LogFactory.

See Also:
Constant Field Values
Constructor Detail

LogFactory

public LogFactory()
Method Detail

getDefaultLogger

public abstract Logger getDefaultLogger()
                                 throws ConfigurationException
Get default logger. This method exists to support backward compatibility prior to the factory class. Prefer getLogger(String type) instead.

Returns:
Logger
Throws:
ConfigurationException

getLogger

public abstract Logger getLogger(java.lang.String type)
                          throws ConfigurationException
Get a logger instance for the provided type.

Parameters:
type -
Returns:
Logger
Throws:
ConfigurationException

getLogger

public Logger getLogger(java.lang.Class type)
                 throws ConfigurationException
Get a logger instance for the provided type.

Parameters:
type -
Returns:
Logger
Throws:
ConfigurationException

getFactory

public static LogFactory getFactory(java.lang.String factoryImpl)
                             throws ConfigurationException
Get a LogFactory based on the implementation class name provided as a parameter.

Parameters:
factoryImpl - - the class name (fully qualified for the LogFactory sub-class that implements the provided functionality.
Returns:
LogFactory
Throws:
ConfigurationException
Since:
1.0


Copyright © 2002-2004 Robert Half International. All Rights Reserved.