Class LocalizedLoggerFactory


  • public final class LocalizedLoggerFactory
    extends Object
    A factory of LocalizedLogger instances which obtains a SLF4J Logger by calling the appropriate LoggerFactory method and wrapping it in an instance of LocalizedLogger.
    • Method Detail

      • getInstance

        public static LocalizedLoggerFactory getInstance()
        Returns a localized logger factory which will create localized loggers for the default locale.
        Returns:
        The localized logger factory.
      • getInstance

        public static LocalizedLoggerFactory getInstance​(Locale locale)
        Returns a localized logger factory which will create localized loggers for the provided locale.
        Parameters:
        locale - The locale to which loggers created by the factory will localize all log messages.
        Returns:
        The localized logger factory.
      • getLocalizedLogger

        public LocalizedLogger getLocalizedLogger​(Logger logger)
        Returns a localized logger which will forward log messages to the provided SLF4J Logger.
        Parameters:
        logger - The wrapped SLF4J Logger.
        Returns:
        The localized logger.
        See Also:
        LoggerFactory.getLogger(String)