gnu.hylafax.logging
Class LoggingFactory

java.lang.Object
  |
  +--gnu.hylafax.logging.LoggingFactory

public class LoggingFactory
extends java.lang.Object

Implements a logging factory that uses log4j if it is available. If log4 is not available then output is logged to the console via System.out. It is possible to change the PrintStream / OutputStream of the console logger Future enhancements could include adding support for java.util.logging. However, there would have to be some mechanism for determining which method to use. The current implementation only uses the console logger if log4j is not available. log4j can be found at http://logging.apache.org

Author:
Steven Jardine

Constructor Summary
LoggingFactory()
           
 
Method Summary
static Logger getLogger(java.lang.Class logClass)
          Returns the a logger for the class passed via logClass.
static Logger getLogger(java.lang.String logClass)
          Checks to see if the class is defined and returns a Logger for it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingFactory

public LoggingFactory()
Method Detail

getLogger

public static Logger getLogger(java.lang.Class logClass)
Returns the a logger for the class passed via logClass.
Parameters:
logClass - the class to be used for logging.
Returns:
a object that implements the Logger interface for the specified class.

getLogger

public static Logger getLogger(java.lang.String logClass)
Checks to see if the class is defined and returns a Logger for it. If the class is not defined null is returned.
Parameters:
logClass - the name of the class to be used for logging.
Returns:
a object that implements the Logger interface for the specified class.