Package org.apache.logging.log4j.spi
Class ExtendedLoggerWrapper
java.lang.Object
org.apache.logging.log4j.spi.AbstractLogger
org.apache.logging.log4j.spi.ExtendedLoggerWrapper
- All Implemented Interfaces:
Serializable
,Logger
,ExtendedLogger
,LocationAwareLogger
Wrapper class that exposes the protected AbstractLogger methods to support wrapped loggers.
- See Also:
-
Field Summary
Fields inherited from class org.apache.logging.log4j.spi.AbstractLogger
CATCHING_MARKER, DEFAULT_FLOW_MESSAGE_FACTORY_CLASS, DEFAULT_MESSAGE_FACTORY_CLASS, ENTRY_MARKER, EXCEPTION_MARKER, EXIT_MARKER, FLOW_MARKER, name, THROWING_MARKER
-
Constructor Summary
ConstructorDescriptionExtendedLoggerWrapper
(ExtendedLogger logger, String name, MessageFactory messageFactory) Constructor that wraps and existing Logger. -
Method Summary
Modifier and TypeMethodDescriptiongetLevel()
Gets the Level associated with the Logger.boolean
isEnabled
(Level level, Marker marker, CharSequence message, Throwable t) Detect if the event would be logged.boolean
Detect if the event would be logged.boolean
Detect if the event would be logged.boolean
Tests if logging is enabled.boolean
Detect if the event would be logged.boolean
Tests if logging is enabled.boolean
Tests if logging is enabled.boolean
Tests if logging is enabled.boolean
isEnabled
(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4) Tests if logging is enabled.boolean
isEnabled
(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) Tests if logging is enabled.boolean
isEnabled
(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) Determines if logging is enabled.boolean
isEnabled
(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) Tests if logging is enabled.boolean
isEnabled
(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) Tests if logging is enabled.boolean
isEnabled
(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) Tests if logging is enabled.boolean
Detect if the event would be logged.boolean
Detect if the event would be logged.void
Always log an event.Methods inherited from class org.apache.logging.log4j.spi.AbstractLogger
always, atDebug, atError, atFatal, atInfo, atLevel, atTrace, atWarn, catching, catching, catching, catchingMsg, checkMessageFactory, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, enter, enter, enter, enter, enter, entry, entry, entry, entryMsg, entryMsg, entryMsg, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, exit, exit, exit, exit, exitMsg, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, getFlowMessageFactory, getLogBuilder, getMessageFactory, getName, getRecursionDepth, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, 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, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, printf, printf, requiresLocation, throwing, throwing, throwing, throwingMsg, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, traceEntry, traceEntry, traceEntry, traceEntry, traceEntry, traceExit, traceExit, traceExit, traceExit, traceExit, traceExit, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn
-
Field Details
-
logger
The wrapped Logger.
-
-
Constructor Details
-
ExtendedLoggerWrapper
Constructor that wraps and existing Logger.- Parameters:
logger
- The Logger to wrap.name
- The name of the Logger.messageFactory
- TODO
-
-
Method Details
-
getLevel
Description copied from interface:Logger
Gets the Level associated with the Logger.- Returns:
- the Level associate with the Logger.
-
isEnabled
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
Detect if the event would be logged.- Parameters:
level
- The logging Level to check.marker
- A Marker or null.message
- The message CharSequence.t
- A Throwable.- Returns:
- true if the event would be logged for the Level, Marker, Object and Throwable, false otherwise.
-
isEnabled
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
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
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
Description copied from interface:ExtendedLogger
Tests if logging is enabled.- Parameters:
level
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parameters- Returns:
- True if logging is enabled, false otherwise.
-
isEnabled
Description copied from interface:ExtendedLogger
Tests if logging is enabled.- Parameters:
level
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parameters- Returns:
- True if logging is enabled, false otherwise.
-
isEnabled
public boolean isEnabled(Level level, Marker marker, String message, Object p0, Object p1, Object p2) Description copied from interface:ExtendedLogger
Tests if logging is enabled.- Parameters:
level
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parameters- Returns:
- True if logging is enabled, false otherwise.
-
isEnabled
public boolean isEnabled(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3) Description copied from interface:ExtendedLogger
Tests if logging is enabled.- Parameters:
level
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parameters- Returns:
- True if logging is enabled, false otherwise.
-
isEnabled
public boolean isEnabled(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4) Description copied from interface:ExtendedLogger
Tests if logging is enabled.- Parameters:
level
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parameters- Returns:
- True if logging is enabled, false otherwise.
-
isEnabled
public boolean isEnabled(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) Description copied from interface:ExtendedLogger
Tests if logging is enabled.- Parameters:
level
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parametersp5
- the message parameters- Returns:
- True if logging is enabled, false otherwise.
-
isEnabled
public boolean isEnabled(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) Description copied from interface:ExtendedLogger
Determines if logging is enabled.- Parameters:
level
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parametersp5
- the message parametersp6
- the message parameters- Returns:
- True if logging is enabled, false otherwise.
-
isEnabled
public boolean isEnabled(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) Description copied from interface:ExtendedLogger
Tests if logging is enabled.- Parameters:
level
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parametersp5
- the message parametersp6
- the message parametersp7
- the message parameters- Returns:
- True if logging is enabled, false otherwise.
-
isEnabled
public boolean isEnabled(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) Description copied from interface:ExtendedLogger
Tests if logging is enabled.- Parameters:
level
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parametersp5
- the message parametersp6
- the message parametersp7
- the message parametersp8
- the message parameters- Returns:
- True if logging is enabled, false otherwise.
-
isEnabled
public boolean isEnabled(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) Description copied from interface:ExtendedLogger
Tests if logging is enabled.- Parameters:
level
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parametersp5
- the message parametersp6
- the message parametersp7
- the message parametersp8
- the message parametersp9
- the message parameters- Returns:
- True if logging is enabled, false otherwise.
-
isEnabled
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
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 callerlevel
- The logging levelmarker
- The Markermessage
- The Message.t
- A Throwable or null.
-