Package org.eclipse.aether.spi.log
Class NullLoggerFactory
- java.lang.Object
-
- org.eclipse.aether.spi.log.NullLoggerFactory
-
- All Implemented Interfaces:
LoggerFactory
public final class NullLoggerFactory extends java.lang.Object implements LoggerFactory
A logger factory that disables any logging.
-
-
Field Summary
Fields Modifier and Type Field Description static LoggerFactoryINSTANCEThe singleton instance of this factory.static LoggerLOGGERThe singleton logger used by this factory.
-
Constructor Summary
Constructors Modifier Constructor Description privateNullLoggerFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LoggergetLogger(java.lang.String name)Gets a logger for a class with the specified name.static LoggergetSafeLogger(LoggerFactory loggerFactory, java.lang.Class<?> type)Gets a logger from the specified factory for the given class, falling back to a logger from this factory if the specified factory isnullor fails to provide a logger.
-
-
-
Field Detail
-
INSTANCE
public static final LoggerFactory INSTANCE
The singleton instance of this factory.
-
LOGGER
public static final Logger LOGGER
The singleton logger used by this factory.
-
-
Method Detail
-
getLogger
public Logger getLogger(java.lang.String name)
Description copied from interface:LoggerFactoryGets a logger for a class with the specified name.- Specified by:
getLoggerin interfaceLoggerFactory- Parameters:
name- The name of the class requesting a logger, must not benull.- Returns:
- The requested logger, never
null.
-
getSafeLogger
public static Logger getSafeLogger(LoggerFactory loggerFactory, java.lang.Class<?> type)
Gets a logger from the specified factory for the given class, falling back to a logger from this factory if the specified factory isnullor fails to provide a logger.- Parameters:
loggerFactory- The logger factory from which to get the logger, may benull.type- The class for which to get the logger, must not benull.- Returns:
- The requested logger, never
null.
-
-