org.apache.ojb.broker.util.logging
Class LoggerFactoryImpl

java.lang.Object
  extended by org.apache.ojb.broker.util.logging.LoggerFactoryImpl

public class LoggerFactoryImpl
extends Object

The factory class LoggerFactory can be used to create Logger instances. The Logger-implementation class served by the factory is configured by settings in the OJB.properties file.

Version:
$Id: LoggerFactoryImpl.java,v 1.1 2007-08-24 22:17:32 ewestfal Exp $
Author:
Thomas Mahler, Leandro Rodrigo Saad Cruz
See Also:
jakarta-log4j

Field Summary
static String BOOT_LOG_LEVEL_STR
           
protected static String BOOT_STR
           
protected static String DEFAULT_STR
           
protected static LoggerFactoryImpl INSTANCE
           
 
Method Summary
protected  Logger createPoorMansLogger_Boot()
           
protected  Logger createStringBufferLogger_Boot()
           
 Logger getBootLogger()
          returns a minimal logger that needs no configuration and can thus be safely used during OJB boot phase (i.e.
 Logger getDefaultLogger()
          returns the default logger.
static LoggerFactoryImpl getInstance()
           
 Logger getLogger(Class clazz)
          returns a Logger.
 Logger getLogger(String loggerName)
          returns a Logger.
protected  void reassignBootLogger(boolean forceError)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOT_LOG_LEVEL_STR

public static final String BOOT_LOG_LEVEL_STR
See Also:
Constant Field Values

BOOT_STR

protected static final String BOOT_STR
See Also:
Constant Field Values

DEFAULT_STR

protected static final String DEFAULT_STR
See Also:
Constant Field Values

INSTANCE

protected static final LoggerFactoryImpl INSTANCE
Method Detail

getInstance

public static LoggerFactoryImpl getInstance()

getBootLogger

public Logger getBootLogger()
returns a minimal logger that needs no configuration and can thus be safely used during OJB boot phase (i.e. when OJB.properties have not been loaded).

Returns:
Logger the OJB BootLogger

getDefaultLogger

public Logger getDefaultLogger()
returns the default logger. This Logger can be used when it is not appropriate to use a dedicated fresh Logger instance.

Returns:
default Logger

getLogger

public Logger getLogger(Class clazz)
returns a Logger. The Logger is named after the full qualified name of input parameter clazz

Parameters:
clazz - the Class which name is to be used as name
Returns:
Logger the returned Logger

getLogger

public Logger getLogger(String loggerName)
returns a Logger.

Parameters:
loggerName - the name of the Logger
Returns:
Logger the returned Logger

reassignBootLogger

protected void reassignBootLogger(boolean forceError)
Parameters:
forceError -

createPoorMansLogger_Boot

protected Logger createPoorMansLogger_Boot()

createStringBufferLogger_Boot

protected Logger createStringBufferLogger_Boot()


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.