Class CoreLogger


  • public class CoreLogger
    extends ApiLogger
    Log4j Core implementation of the JUL Logger class. Note that this implementation does not use the Handler class. Instead, logging is delegated to the underlying Log4j Logger which uses Appenders instead.
    Since:
    2.1
    • Field Detail

      • logger

        private final Logger logger
    • Constructor Detail

      • CoreLogger

        CoreLogger​(Logger logger)
        Constructs a Logger using a Log4j Logger.
        Parameters:
        logger - the underlying Logger to base this Logger on
    • Method Detail

      • setLevel

        public void setLevel​(java.util.logging.Level level)
                      throws java.lang.SecurityException
        Overrides:
        setLevel in class ApiLogger
        Throws:
        java.lang.SecurityException
      • setUseParentHandlers

        public void setUseParentHandlers​(boolean additive)
        Marks the underlying Logger as additive.
        Overrides:
        setUseParentHandlers in class java.util.logging.Logger
        Parameters:
        additive - true if this Logger should be additive
        See Also:
        Logger.setAdditive(boolean)
      • getUseParentHandlers

        public boolean getUseParentHandlers()
        Indicates if the underlying Logger is additive. Note that the Log4j version of JDK Loggers do not use Handlers.
        Overrides:
        getUseParentHandlers in class java.util.logging.Logger
        Returns:
        true if this Logger is additive, or false otherwise
        See Also:
        Logger.isAdditive()
      • getParent

        public java.util.logging.Logger getParent()
        Overrides:
        getParent in class java.util.logging.Logger