Class Slf4jLoggerFactory
java.lang.Object
org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory
- All Implemented Interfaces:
Service
,LoggerFactory
A logger factory that delegates to SLF4J logging.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
private static final class
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of this logger factory.Slf4jLoggerFactory
(org.slf4j.ILoggerFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionprivate org.slf4j.ILoggerFactory
Gets a logger for a class with the specified name.void
initService
(ServiceLocator locator) Provides the opportunity to initialize this service and to acquire other services for its operation from the locator.static boolean
setLoggerFactory
(org.slf4j.ILoggerFactory factory)
-
Field Details
-
AVAILABLE
private static final boolean AVAILABLE -
factory
private org.slf4j.ILoggerFactory factory
-
-
Constructor Details
-
Slf4jLoggerFactory
public Slf4jLoggerFactory()Creates an instance of this logger factory. -
Slf4jLoggerFactory
@Inject Slf4jLoggerFactory(@Nullable org.slf4j.ILoggerFactory factory)
-
-
Method Details
-
isSlf4jAvailable
public static boolean isSlf4jAvailable() -
initService
Description copied from interface:Service
Provides the opportunity to initialize this service and to acquire other services for its operation from the locator. A service must not save the reference to the provided service locator.- Specified by:
initService
in interfaceService
- Parameters:
locator
- The service locator, must not benull
.
-
setLoggerFactory
-
getLogger
Description copied from interface:LoggerFactory
Gets a logger for a class with the specified name.- Specified by:
getLogger
in interfaceLoggerFactory
- Parameters:
name
- The name of the class requesting a logger, must not benull
.- Returns:
- The requested logger, never
null
.
-
getFactory
private org.slf4j.ILoggerFactory getFactory()
-