Package org.slf4j.impl
Class StaticLoggerBinder
java.lang.Object
org.slf4j.impl.StaticLoggerBinder
- All Implemented Interfaces:
LoggerFactoryBinder
The binding of
LoggerFactory class with an actual instance of
ILoggerFactory is performed using information returned by this class.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ILoggerFactoryThe ILoggerFactory instance returned by thegetLoggerFactory()method should always be the same objectprivate static final Stringstatic StringDeclare the version of the SLF4J API this implementation is compiled against.private static final StaticLoggerBinderThe unique instance of this class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the instance ofILoggerFactorythatLoggerFactoryclass should bind to.The String form of theILoggerFactoryobject that thisLoggerFactoryBinderinstance is intended to return.static final StaticLoggerBinderReturn the singleton of this class.
-
Field Details
-
SINGLETON
The unique instance of this class. -
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
-
loggerFactory
The ILoggerFactory instance returned by thegetLoggerFactory()method should always be the same object
-
-
Constructor Details
-
StaticLoggerBinder
private StaticLoggerBinder()
-
-
Method Details
-
getSingleton
Return the singleton of this class.- Returns:
- the StaticLoggerBinder singleton
-
getLoggerFactory
Description copied from interface:LoggerFactoryBinderReturn the instance ofILoggerFactorythatLoggerFactoryclass should bind to.- Specified by:
getLoggerFactoryin interfaceLoggerFactoryBinder- Returns:
- the instance of
ILoggerFactorythatLoggerFactoryclass should bind to.
-
getLoggerFactoryClassStr
Description copied from interface:LoggerFactoryBinderThe String form of theILoggerFactoryobject that thisLoggerFactoryBinderinstance is intended to return.This method allows the developer to interrogate this binder's intention which may be different from the
ILoggerFactoryinstance it is able to yield in practice. The discrepancy should only occur in case of errors.- Specified by:
getLoggerFactoryClassStrin interfaceLoggerFactoryBinder- Returns:
- the class name of the intended
ILoggerFactoryinstance
-