Package eu.cloudnetservice.common.log
Class FallbackLoggerFactory
java.lang.Object
eu.cloudnetservice.common.log.FallbackLoggerFactory
- All Implemented Interfaces:
LoggerFactory
The fallback logger factory which creates the loggers based on java.util.logging loggers which get wrapped into
custom loggers. This factory caches the logger instances which means that demanding a logger with the same name twice
results in the same logger instance each time.
- Since:
- 4.0
-
Field Summary
FieldsFields inherited from interface eu.cloudnetservice.common.log.LoggerFactory
ROOT_LOGGER_NAME -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
createdLoggers
-
-
Constructor Details
-
FallbackLoggerFactory
FallbackLoggerFactory()
-
-
Method Details
-
logger
Gets or creates a logger with the given name. Overridden methods may but must no cache created logger objects, meaning that this method can also create a new logger each time this method is called.- Specified by:
loggerin interfaceLoggerFactory- Parameters:
name- the name of the logger.- Returns:
- the cached or created logger object having the given name.
-