Package org.slf4j.impl
Class StaticLoggerBinder
- java.lang.Object
-
- org.slf4j.impl.StaticLoggerBinder
-
- All Implemented Interfaces:
LoggerFactoryBinder
public class StaticLoggerBinder extends java.lang.Object implements LoggerFactoryBinder
The binding ofLoggerFactory
class with an actual instance ofILoggerFactory
is performed using information returned by this class.
-
-
Field Summary
Fields Modifier and Type Field Description private ILoggerFactory
loggerFactory
The ILoggerFactory instance returned by thegetLoggerFactory()
method should always be the same objectprivate static java.lang.String
loggerFactoryClassStr
static java.lang.String
REQUESTED_API_VERSION
Declare the version of the SLF4J API this implementation is compiled against.private static StaticLoggerBinder
SINGLETON
The unique instance of this class.
-
Constructor Summary
Constructors Modifier Constructor Description private
StaticLoggerBinder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ILoggerFactory
getLoggerFactory()
Return the instance ofILoggerFactory
thatLoggerFactory
class should bind to.java.lang.String
getLoggerFactoryClassStr()
The String form of theILoggerFactory
object that thisLoggerFactoryBinder
instance is intended to return.static StaticLoggerBinder
getSingleton()
Return the singleton of this class.
-
-
-
Field Detail
-
SINGLETON
private static final StaticLoggerBinder SINGLETON
The unique instance of this class.
-
REQUESTED_API_VERSION
public static java.lang.String REQUESTED_API_VERSION
Declare the version of the SLF4J API this implementation is compiled against. The value of this field is modified with each major release.
-
loggerFactoryClassStr
private static final java.lang.String loggerFactoryClassStr
-
loggerFactory
private final ILoggerFactory loggerFactory
The ILoggerFactory instance returned by thegetLoggerFactory()
method should always be the same object
-
-
Method Detail
-
getSingleton
public static final StaticLoggerBinder getSingleton()
Return the singleton of this class.- Returns:
- the StaticLoggerBinder singleton
-
getLoggerFactory
public ILoggerFactory getLoggerFactory()
Description copied from interface:LoggerFactoryBinder
Return the instance ofILoggerFactory
thatLoggerFactory
class should bind to.- Specified by:
getLoggerFactory
in interfaceLoggerFactoryBinder
- Returns:
- the instance of
ILoggerFactory
thatLoggerFactory
class should bind to.
-
getLoggerFactoryClassStr
public java.lang.String getLoggerFactoryClassStr()
Description copied from interface:LoggerFactoryBinder
The String form of theILoggerFactory
object that thisLoggerFactoryBinder
instance is intended to return.This method allows the developer to interrogate this binder's intention which may be different from the
ILoggerFactory
instance it is able to yield in practice. The discrepancy should only occur in case of errors.- Specified by:
getLoggerFactoryClassStr
in interfaceLoggerFactoryBinder
- Returns:
- the class name of the intended
ILoggerFactory
instance
-
-