Class AbstractInternalLogger
java.lang.Object
io.netty.util.internal.logging.AbstractInternalLogger
- All Implemented Interfaces:
InternalLogger, Serializable
A skeletal implementation of
InternalLogger. This class implements
all methods that have a InternalLogLevel parameter by default to call
specific logger methods such as InternalLogger.info(String) or InternalLogger.isInfoEnabled().- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractInternalLogger(String name) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidLog an exception (throwable) at the DEBUG level.voidLog an exception (throwable) at the ERROR level.voidLog an exception (throwable) at the INFO level.booleanisEnabled(InternalLogLevel level) Is the logger instance enabled for the specifiedlevel?voidlog(InternalLogLevel level, String msg) Log a message at the specifiedlevel.voidlog(InternalLogLevel level, String format, Object arg) Log a message at the specifiedlevelaccording to the specified format and argument.voidlog(InternalLogLevel level, String format, Object... arguments) Log a message at the specifiedlevelaccording to the specified format and arguments.voidlog(InternalLogLevel level, String format, Object argA, Object argB) Log a message at the specifiedlevelaccording to the specified format and arguments.voidlog(InternalLogLevel level, String msg, Throwable cause) Log an exception (throwable) at the specifiedlevelwith an accompanying message.voidlog(InternalLogLevel level, Throwable cause) Log an exception (throwable) at the specifiedlevel.name()Return the name of thisInternalLoggerinstance.protected ObjecttoString()voidLog an exception (throwable) at the TRACE level.voidLog an exception (throwable) at the WARN level.
-
Constructor Details
-
AbstractInternalLogger
Creates a new instance.
-
-
Method Details
-
name
Description copied from interface:InternalLoggerReturn the name of thisInternalLoggerinstance.- Specified by:
namein interfaceInternalLogger- Returns:
- name of this logger instance
-
isEnabled
Description copied from interface:InternalLoggerIs the logger instance enabled for the specifiedlevel?- Specified by:
isEnabledin interfaceInternalLogger- Returns:
- True if this Logger is enabled for the specified
level, false otherwise.
-
trace
Description copied from interface:InternalLoggerLog an exception (throwable) at the TRACE level.- Specified by:
tracein interfaceInternalLogger- Parameters:
t- the exception (throwable) to log
-
debug
Description copied from interface:InternalLoggerLog an exception (throwable) at the DEBUG level.- Specified by:
debugin interfaceInternalLogger- Parameters:
t- the exception (throwable) to log
-
info
Description copied from interface:InternalLoggerLog an exception (throwable) at the INFO level.- Specified by:
infoin interfaceInternalLogger- Parameters:
t- the exception (throwable) to log
-
warn
Description copied from interface:InternalLoggerLog an exception (throwable) at the WARN level.- Specified by:
warnin interfaceInternalLogger- Parameters:
t- the exception (throwable) to log
-
error
Description copied from interface:InternalLoggerLog an exception (throwable) at the ERROR level.- Specified by:
errorin interfaceInternalLogger- Parameters:
t- the exception (throwable) to log
-
log
Description copied from interface:InternalLoggerLog an exception (throwable) at the specifiedlevelwith an accompanying message.- Specified by:
login interfaceInternalLogger- Parameters:
msg- the message accompanying the exceptioncause- the exception (throwable) to log
-
log
Description copied from interface:InternalLoggerLog an exception (throwable) at the specifiedlevel.- Specified by:
login interfaceInternalLogger- Parameters:
cause- the exception (throwable) to log
-
log
Description copied from interface:InternalLoggerLog a message at the specifiedlevel.- Specified by:
login interfaceInternalLogger- Parameters:
msg- the message string to be logged
-
log
Description copied from interface:InternalLoggerLog a message at the specifiedlevelaccording to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the specified
level.- Specified by:
login interfaceInternalLogger- Parameters:
format- the format stringarg- the argument
-
log
Description copied from interface:InternalLoggerLog a message at the specifiedlevelaccording to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the specified
level.- Specified by:
login interfaceInternalLogger- Parameters:
format- the format stringargA- the first argumentargB- the second argument
-
log
Description copied from interface:InternalLoggerLog a message at the specifiedlevelaccording 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 takingoneandtwoarguments exist solely in order to avoid this hidden cost.- Specified by:
login interfaceInternalLogger- Parameters:
format- the format stringarguments- a list of 3 or more arguments
-
readResolve
- Throws:
ObjectStreamException
-
toString
-