org.slf4j.helpers
Class SubstituteLoggerFactory

java.lang.Object
  extended by org.slf4j.helpers.SubstituteLoggerFactory
All Implemented Interfaces:
ILoggerFactory

public class SubstituteLoggerFactory
extends Object
implements ILoggerFactory

SubstituteLoggerFactory is an trivial implementation of ILoggerFactory which always returns the unique instance of NOPLogger.

It used as a temporary substitute for the real ILoggerFactory during its auto-configuration which may re-enter LoggerFactory to obtain logger instances. See also http://bugzilla.slf4j.org/show_bug.cgi?id=106

Author:
Ceki Gülcü

Constructor Summary
SubstituteLoggerFactory()
           
 
Method Summary
 Logger getLogger(String name)
          Return an appropriate Logger instance as specified by the name parameter.
 List getLoggerNameList()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubstituteLoggerFactory

public SubstituteLoggerFactory()
Method Detail

getLogger

public Logger getLogger(String name)
Description copied from interface: ILoggerFactory
Return an appropriate Logger instance as specified by the name parameter.

If the name parameter is equal to Logger.ROOT_LOGGER_NAME, that is the string value "ROOT" (case insensitive), then the root logger of the underlying logging system is returned.

Null-valued name arguments are considered invalid.

Certain extremely simple logging systems, e.g. NOP, may always return the same logger instance regardless of the requested name.

Specified by:
getLogger in interface ILoggerFactory
Parameters:
name - the name of the Logger to return

getLoggerNameList

public List getLoggerNameList()


Copyright © 2005-2009 QOS.ch. All Rights Reserved.