Class JDKLoggerFactory

  • All Implemented Interfaces:
    Prioritized, java.lang.Comparable<Prioritized>

    public class JDKLoggerFactory
    extends LoggerFactory
    A LoggerFactory implementation that creates and manages instances of JDK logging (Logger).

    This factory provides a concrete implementation for creating JDK-based loggers with the required name. It defines priority-based ordering by implementing the Prioritized interface, ensuring proper loading order when multiple logger factories are present.

    Example Usage

    The typical usage involves relying on the static methods provided by the base class:
    
     // Get a logger instance associated with a specific class
     Logger logger = getLogger(MyClass.class);
    
     // Get a named logger instance
     Logger namedLogger = getLogger("com.example.mylogger");
     

    The factory is automatically loaded via the ServiceLoader mechanism if registered properly in the configuration files.

    Since:
    1.0.0
    Author:
    Mercy
    See Also:
    LoggerFactory, Logger
    • Field Detail

      • JDK_LOGGER_CLASS_NAME

        public static final java.lang.String JDK_LOGGER_CLASS_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • JDKLoggerFactory

        public JDKLoggerFactory()