Package io.netty.util.internal.logging
Class Log4J2Logger
java.lang.Object
org.apache.logging.log4j.spi.AbstractLogger
org.apache.logging.log4j.spi.ExtendedLoggerWrapper
io.netty.util.internal.logging.Log4J2Logger
- All Implemented Interfaces:
InternalLogger
,Serializable
,org.apache.logging.log4j.Logger
,org.apache.logging.log4j.spi.ExtendedLogger
,org.apache.logging.log4j.spi.LocationAwareLogger
class Log4J2Logger
extends org.apache.logging.log4j.spi.ExtendedLoggerWrapper
implements InternalLogger
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private static final boolean
Fields inherited from class org.apache.logging.log4j.spi.ExtendedLoggerWrapper
logger
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, logBuilder, name, THROWING_MARKER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Log an exception (throwable) at the DEBUG level.void
Log an exception (throwable) at the ERROR level.void
Log an exception (throwable) at the INFO level.boolean
isEnabled
(InternalLogLevel level) Is the logger instance enabled for the specifiedlevel
?void
log
(InternalLogLevel level, String msg) Log a message at the specifiedlevel
.void
log
(InternalLogLevel level, String format, Object arg) Log a message at the specifiedlevel
according to the specified format and argument.void
log
(InternalLogLevel level, String format, Object... arguments) Log a message at the specifiedlevel
according to the specified format and arguments.void
log
(InternalLogLevel level, String format, Object argA, Object argB) Log a message at the specifiedlevel
according to the specified format and arguments.void
log
(InternalLogLevel level, String msg, Throwable t) Log an exception (throwable) at the specifiedlevel
with an accompanying message.void
log
(InternalLogLevel level, Throwable t) Log an exception (throwable) at the specifiedlevel
.name()
Return the name of thisInternalLogger
instance.private static org.apache.logging.log4j.Level
toLevel
(InternalLogLevel level) void
Log an exception (throwable) at the TRACE level.void
Log an exception (throwable) at the WARN level.Methods inherited from class org.apache.logging.log4j.spi.ExtendedLoggerWrapper
getLevel, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, logMessage
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, 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.util.internal.logging.InternalLogger
debug, debug, debug, debug, debug, error, error, error, error, error, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
VARARGS_ONLY
private static final boolean VARARGS_ONLY
-
-
Constructor Details
-
Log4J2Logger
Log4J2Logger(org.apache.logging.log4j.Logger logger)
-
-
Method Details
-
name
Description copied from interface:InternalLogger
Return the name of thisInternalLogger
instance.- Specified by:
name
in interfaceInternalLogger
- Returns:
- name of this logger instance
-
trace
Description copied from interface:InternalLogger
Log an exception (throwable) at the TRACE level.- Specified by:
trace
in interfaceInternalLogger
- Parameters:
t
- the exception (throwable) to log
-
debug
Description copied from interface:InternalLogger
Log an exception (throwable) at the DEBUG level.- Specified by:
debug
in interfaceInternalLogger
- Parameters:
t
- the exception (throwable) to log
-
info
Description copied from interface:InternalLogger
Log an exception (throwable) at the INFO level.- Specified by:
info
in interfaceInternalLogger
- Parameters:
t
- the exception (throwable) to log
-
warn
Description copied from interface:InternalLogger
Log an exception (throwable) at the WARN level.- Specified by:
warn
in interfaceInternalLogger
- Parameters:
t
- the exception (throwable) to log
-
error
Description copied from interface:InternalLogger
Log an exception (throwable) at the ERROR level.- Specified by:
error
in interfaceInternalLogger
- Parameters:
t
- the exception (throwable) to log
-
isEnabled
Description copied from interface:InternalLogger
Is the logger instance enabled for the specifiedlevel
?- Specified by:
isEnabled
in interfaceInternalLogger
- Returns:
- True if this Logger is enabled for the specified
level
, false otherwise.
-
log
Description copied from interface:InternalLogger
Log a message at the specifiedlevel
.- Specified by:
log
in interfaceInternalLogger
- Parameters:
msg
- the message string to be logged
-
log
Description copied from interface:InternalLogger
Log a message at the specifiedlevel
according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the specified
level
.- Specified by:
log
in interfaceInternalLogger
- Parameters:
format
- the format stringarg
- the argument
-
log
Description copied from interface:InternalLogger
Log a message at the specifiedlevel
according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the specified
level
.- Specified by:
log
in interfaceInternalLogger
- Parameters:
format
- the format stringargA
- the first argumentargB
- the second argument
-
log
Description copied from interface:InternalLogger
Log a message at the specifiedlevel
according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the specified
level
. However, this variant incurs the hidden (and relatively small) cost of creating anObject[]
before invoking the method, even if this logger is disabled for the specifiedlevel
. The variants takingone
andtwo
arguments exist solely in order to avoid this hidden cost.- Specified by:
log
in interfaceInternalLogger
- Parameters:
format
- the format stringarguments
- a list of 3 or more arguments
-
log
Description copied from interface:InternalLogger
Log an exception (throwable) at the specifiedlevel
with an accompanying message.- Specified by:
log
in interfaceInternalLogger
- Parameters:
msg
- the message accompanying the exceptiont
- the exception (throwable) to log
-
log
Description copied from interface:InternalLogger
Log an exception (throwable) at the specifiedlevel
.- Specified by:
log
in interfaceInternalLogger
- Parameters:
t
- the exception (throwable) to log
-
toLevel
-