Class FallbackLoggerFactory

java.lang.Object
eu.cloudnetservice.common.log.FallbackLoggerFactory
All Implemented Interfaces:
LoggerFactory

@Internal final class FallbackLoggerFactory extends Object implements 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 Details

  • 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:
      logger in interface LoggerFactory
      Parameters:
      name - the name of the logger.
      Returns:
      the cached or created logger object having the given name.