org.apache.logging.log4j.spi
Class AbstractLoggerWrapper

java.lang.Object
  extended by org.apache.logging.log4j.spi.AbstractLogger
      extended by org.apache.logging.log4j.spi.AbstractLoggerWrapper
All Implemented Interfaces:
Logger

public class AbstractLoggerWrapper
extends AbstractLogger

Wrapper class that exposes the protected AbstractLogger methods to support wrapped loggers.


Field Summary
protected  AbstractLogger logger
          The wrapped Logger.
 
Fields inherited from class org.apache.logging.log4j.spi.AbstractLogger
CATCHING_MARKER, DEFAULT_MESSAGE_FACTORY_CLASS, ENTRY_MARKER, EXCEPTION_MARKER, EXIT_MARKER, FLOW_MARKER, THROWING_MARKER
 
Constructor Summary
AbstractLoggerWrapper(AbstractLogger logger, String name, MessageFactory messageFactory)
          Constructor that wraps and existing Logger.
 
Method Summary
 boolean isEnabled(Level level, Marker marker, Message data, Throwable t)
          Detect if the event would be logged.
 boolean isEnabled(Level level, Marker marker, Object data, Throwable t)
          Detect if the event would be logged.
 boolean isEnabled(Level level, Marker marker, String data)
          Detect if the event would be logged.
 boolean isEnabled(Level level, Marker marker, String data, Object... p1)
          Detect if the event would be logged.
 boolean isEnabled(Level level, Marker marker, String data, Throwable t)
          Detect if the event would be logged.
 void log(Marker marker, String fqcn, Level level, Message data, Throwable t)
          Log an event.
 
Methods inherited from class org.apache.logging.log4j.spi.AbstractLogger
catching, catching, catching, checkMessageFactory, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, entry, entry, entry, error, error, error, error, error, error, error, error, error, error, error, error, error, error, exit, exit, exit, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, getMessageFactory, getName, info, info, info, info, info, info, info, info, info, info, info, info, info, info, isDebugEnabled, isDebugEnabled, isEnabled, isEnabled, isErrorEnabled, isErrorEnabled, isFatalEnabled, isFatalEnabled, isInfoEnabled, isInfoEnabled, isTraceEnabled, isTraceEnabled, isWarnEnabled, isWarnEnabled, log, log, log, log, log, log, log, log, log, log, log, log, log, log, throwing, throwing, throwing, toString, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected final AbstractLogger logger
The wrapped Logger.

Constructor Detail

AbstractLoggerWrapper

public AbstractLoggerWrapper(AbstractLogger 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

log

public void log(Marker marker,
                String fqcn,
                Level level,
                Message data,
                Throwable t)
Log an event.

Specified by:
log in class AbstractLogger
Parameters:
marker - The Marker
fqcn - The fully qualified class name of the caller
level - The logging level
data - The Message.
t - A Throwable or null.

isEnabled

public boolean isEnabled(Level level,
                         Marker marker,
                         String data)
Detect if the event would be logged.

Specified by:
isEnabled in class AbstractLogger
Parameters:
level - The logging Level to check.
marker - A Marker or null.
data - The message.
Returns:
true if the event would be logged for the Level, Marker and data, false otherwise.

isEnabled

public boolean isEnabled(Level level,
                         Marker marker,
                         String data,
                         Throwable t)
Detect if the event would be logged.

Specified by:
isEnabled in class AbstractLogger
Parameters:
level - The logging Level to check.
marker - A Marker or null.
data - The message.
t - A Throwable.
Returns:
true if the event would be logged for the Level, Marker, data and Throwable, false otherwise.

isEnabled

public boolean isEnabled(Level level,
                         Marker marker,
                         String data,
                         Object... p1)
Detect if the event would be logged.

Specified by:
isEnabled in class AbstractLogger
Parameters:
level - The logging Level to check.
marker - A Marker or null.
data - The message.
p1 - The parameters.
Returns:
true if the event would be logged for the Level, Marker, data and parameter.

isEnabled

public boolean isEnabled(Level level,
                         Marker marker,
                         Object data,
                         Throwable t)
Detect if the event would be logged.

Specified by:
isEnabled in class AbstractLogger
Parameters:
level - The logging Level to check.
marker - A Marker or null.
data - 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,
                         Message data,
                         Throwable t)
Detect if the event would be logged.

Specified by:
isEnabled in class AbstractLogger
Parameters:
level - The logging Level to check.
marker - A Marker or null.
data - The Message.
t - A Throwable.
Returns:
true if the event would be logged for the Level, Marker, Message and Throwable, false otherwise.


Copyright © 1999-2013 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.