SLF4J 1.0

org.slf4j.impl
Class SystemPropBinder

java.lang.Object
  |
  +--org.slf4j.impl.SystemPropBinder
All Implemented Interfaces:
LoggerFactoryBinder

public class SystemPropBinder
extends java.lang.Object
implements LoggerFactoryBinder

Allows for dynamic binding as specified by information contained in the LOGGER_FACTORY_PROPERTY java system property.

Author:
Ceki Gülcü

Field Summary
static java.lang.String LOGGER_FACTORY_FACTORY_METHOD_NAME
          Constant used to determine the name of the factory method for creating logger factories.
static java.lang.String LOGGER_FACTORY_PROPERTY
          The name of the system property to set in order to instruct LoggerFactory class to use a specific ILoggerFactory.
 
Constructor Summary
SystemPropBinder()
           
 
Method Summary
 ILoggerFactory getLoggerFactory()
          Fetch the appropriate ILoggerFactory as instructed by the system properties.
 java.lang.String getLoggerFactoryClassStr()
          The String form of the ILoggerFactory object that this LoggerFactoryBinder instance is intended to return.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER_FACTORY_PROPERTY

public static final java.lang.String LOGGER_FACTORY_PROPERTY
The name of the system property to set in order to instruct LoggerFactory class to use a specific ILoggerFactory.

See Also:
Constant Field Values

LOGGER_FACTORY_FACTORY_METHOD_NAME

public static final java.lang.String LOGGER_FACTORY_FACTORY_METHOD_NAME
Constant used to determine the name of the factory method for creating logger factories.

See Also:
Constant Field Values
Constructor Detail

SystemPropBinder

public SystemPropBinder()
Method Detail

getLoggerFactory

public ILoggerFactory getLoggerFactory()
Fetch the appropriate ILoggerFactory as instructed by the system properties.

Specified by:
getLoggerFactory in interface LoggerFactoryBinder
Returns:
The appropriate ILoggerFactory instance as directed from the system properties

getLoggerFactoryClassStr

public java.lang.String getLoggerFactoryClassStr()
Description copied from interface: LoggerFactoryBinder
The String form of the ILoggerFactory object that this LoggerFactoryBinder instance is intended to return.

This method allows the developer to intterogate this binder's intention which may be different from the ILoggerFactory instance it is able to yield in practice. The discrepency should only occur in case of errors.

Specified by:
getLoggerFactoryClassStr in interface LoggerFactoryBinder
Returns:
the class name of the intended ILoggerFactory instance

Copyright 2004-2006 SLF4J.ORG, QOS.ch