org.apache.logging.log4j.spi

Class ExtendedLoggerWrapper

    • Field Detail

    • Constructor Detail

      • ExtendedLoggerWrapper

        public ExtendedLoggerWrapper(ExtendedLogger logger,
                             String name,
                             MessageFactory messageFactory)
        Constructor that wraps and existing Logger.
        Parameters:
        logger - The Logger to wrap.
        name - The name of the Logger.
        messageFactory - TODO
    • Method Detail

      • getLevel

        public Level getLevel()
        Description copied from interface: Logger
        Gets the Level associated with the Logger.
        Returns:
        the Level associate with the Logger.
      • isEnabled

        public boolean isEnabled(Level level,
                        Marker marker,
                        Message message,
                        Throwable t)
        Detect if the event would be logged.
        Parameters:
        level - The logging Level to check.
        marker - A Marker or null.
        message - The Message.
        t - A Throwable.
        Returns:
        true if the event would be logged for the Level, Marker, Message and Throwable, false otherwise.
      • isEnabled

        public boolean isEnabled(Level level,
                        Marker marker,
                        Object message,
                        Throwable t)
        Detect if the event would be logged.
        Parameters:
        level - The logging Level to check.
        marker - A Marker or null.
        message - The message.
        t - A Throwable.
        Returns:
        true if the event would be logged for the Level, Marker, Object and Throwable, false otherwise.
      • isEnabled

        public boolean isEnabled(Level level,
                        Marker marker,
                        String message)
        Detect if the event would be logged.
        Parameters:
        level - The logging Level to check.
        marker - A Marker or null.
        message - The message.
        Returns:
        true if the event would be logged for the Level, Marker, message and parameter.
      • isEnabled

        public boolean isEnabled(Level level,
                        Marker marker,
                        String message,
                        Object... params)
        Detect if the event would be logged.
        Parameters:
        level - The logging Level to check.
        marker - A Marker or null.
        message - The message.
        params - The parameters.
        Returns:
        true if the event would be logged for the Level, Marker, message and parameter.
      • isEnabled

        public boolean isEnabled(Level level,
                        Marker marker,
                        String message,
                        Throwable t)
        Detect if the event would be logged.
        Parameters:
        level - The logging Level to check.
        marker - A Marker or null.
        message - The message.
        t - A Throwable.
        Returns:
        true if the event would be logged for the Level, Marker, message and Throwable, false otherwise.
      • logMessage

        public void logMessage(String fqcn,
                      Level level,
                      Marker marker,
                      Message message,
                      Throwable t)
        Always log an event. This tends to be already guarded by an enabled check, so this method should not check for the logger level again
        Parameters:
        fqcn - The fully qualified class name of the caller
        level - The logging level
        marker - The Marker
        message - The Message.
        t - A Throwable or null.

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.