Class Slf4jLoggerFactory
- java.lang.Object
-
- org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory
-
- All Implemented Interfaces:
Service
,LoggerFactory
@Named("slf4j") public class Slf4jLoggerFactory extends Object implements LoggerFactory, Service
A logger factory that delegates to SLF4J logging.
-
-
Constructor Summary
Constructors Constructor Description Slf4jLoggerFactory()
Creates an instance of this logger factory.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Logger
getLogger(String name)
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
isSlf4jAvailable()
Slf4jLoggerFactory
setLoggerFactory(org.slf4j.ILoggerFactory factory)
-
-
-
Constructor Detail
-
Slf4jLoggerFactory
public Slf4jLoggerFactory()
Creates an instance of this logger factory.
-
-
Method Detail
-
isSlf4jAvailable
public static boolean isSlf4jAvailable()
-
initService
public void initService(ServiceLocator locator)
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
public Slf4jLoggerFactory setLoggerFactory(org.slf4j.ILoggerFactory factory)
-
getLogger
public Logger getLogger(String name)
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
.
-
-