Top Description Fields Constructors Methods
io.netty.util.internal.logging

public abstract Class AbstractInternalLogger

extends Object
implements InternalLogger, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, io.netty.util.internal.logging.InternalLogger
Known Direct Subclasses
io.netty.util.internal.logging.CommonsLogger, io.netty.util.internal.logging.JdkLogger, io.netty.util.internal.logging.LocationAwareSlf4JLogger, io.netty.util.internal.logging.Log4JLogger, io.netty.util.internal.logging.Slf4JLogger
Imports
io.netty.util.internal.ObjectUtil, .StringUtil, java.io.ObjectStreamException, .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 info(String) or isInfoEnabled().

Field Summary

Modifier and TypeField and Description
pack-priv static final String
private final String
private static final long

Constructor Summary

AccessConstructor and Description
protected
AbstractInternalLogger(String name)

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public void
debug(Throwable
the exception (throwable) to log
t
)

Implements io.netty.util.internal.logging.InternalLogger.debug.

Log an exception (throwable) at the DEBUG level.
public void
error(Throwable
the exception (throwable) to log
t
)

Implements io.netty.util.internal.logging.InternalLogger.error.

Log an exception (throwable) at the ERROR level.
public void
info(Throwable
the exception (throwable) to log
t
)

Implements io.netty.util.internal.logging.InternalLogger.info.

Log an exception (throwable) at the INFO level.
public boolean
isEnabled(InternalLogLevel level)

Implements io.netty.util.internal.logging.InternalLogger.isEnabled.

Is the logger instance enabled for the specified level?
public void
log(InternalLogLevel level, String
the message accompanying the exception
msg
,
Throwable
the exception (throwable) to log
cause
)

Implements io.netty.util.internal.logging.InternalLogger.log.

Log an exception (throwable) at the specified level with an accompanying message.
public void
log(InternalLogLevel level, Throwable
the exception (throwable) to log
cause
)

Implements io.netty.util.internal.logging.InternalLogger.log.

Log an exception (throwable) at the specified level.
public void
log(InternalLogLevel level, String
the message string to be logged
msg
)

Implements io.netty.util.internal.logging.InternalLogger.log.

Log a message at the specified level.
public void
log(InternalLogLevel level, String
the format string
format
,
Object
the argument
arg
)

Implements io.netty.util.internal.logging.InternalLogger.log.

Log a message at the specified level according to the specified format and argument.
public void
log(InternalLogLevel level, String
the format string
format
,
Object
the first argument
argA
,
Object
the second argument
argB
)

Implements io.netty.util.internal.logging.InternalLogger.log.

Log a message at the specified level according to the specified format and arguments.
public void
log(InternalLogLevel level, String
the format string
format
,
Object...
a list of 3 or more arguments
arguments
)

Implements io.netty.util.internal.logging.InternalLogger.log.

Log a message at the specified level according to the specified format and arguments.
public String
name()

Implements io.netty.util.internal.logging.InternalLogger.name.

Return the name of this InternalLogger instance.
protected Object
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public void
trace(Throwable
the exception (throwable) to log
t
)

Implements io.netty.util.internal.logging.InternalLogger.trace.

Log an exception (throwable) at the TRACE level.
public void
warn(Throwable
the exception (throwable) to log
t
)

Implements io.netty.util.internal.logging.InternalLogger.warn.

Log an exception (throwable) at the WARN level.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

EXCEPTION_MESSAGEback to summary
pack-priv static final String EXCEPTION_MESSAGE
nameback to summary
private final String name
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

AbstractInternalLoggerback to summary
protected AbstractInternalLogger(String name)

Creates a new instance.

Method Detail

debugback to summary
public void debug(Throwable t)

Implements io.netty.util.internal.logging.InternalLogger.debug.

Doc from io.netty.util.internal.logging.InternalLogger.debug.

Log an exception (throwable) at the DEBUG level.

Parameters
t:Throwable

the exception (throwable) to log

Annotations
@Override
errorback to summary
public void error(Throwable t)

Implements io.netty.util.internal.logging.InternalLogger.error.

Doc from io.netty.util.internal.logging.InternalLogger.error.

Log an exception (throwable) at the ERROR level.

Parameters
t:Throwable

the exception (throwable) to log

Annotations
@Override
infoback to summary
public void info(Throwable t)

Implements io.netty.util.internal.logging.InternalLogger.info.

Doc from io.netty.util.internal.logging.InternalLogger.info.

Log an exception (throwable) at the INFO level.

Parameters
t:Throwable

the exception (throwable) to log

Annotations
@Override
isEnabledback to summary
public boolean isEnabled(InternalLogLevel level)

Implements io.netty.util.internal.logging.InternalLogger.isEnabled.

Doc from io.netty.util.internal.logging.InternalLogger.isEnabled.

Is the logger instance enabled for the specified level?

Returns:boolean

True if this Logger is enabled for the specified level, false otherwise.

Annotations
@Override
logback to summary
public void log(InternalLogLevel level, String msg, Throwable cause)

Implements io.netty.util.internal.logging.InternalLogger.log.

Doc from io.netty.util.internal.logging.InternalLogger.log.

Log an exception (throwable) at the specified level with an accompanying message.

Parameters
msg:String

the message accompanying the exception

cause:Throwable

the exception (throwable) to log

Annotations
@Override
logback to summary
public void log(InternalLogLevel level, Throwable cause)

Implements io.netty.util.internal.logging.InternalLogger.log.

Doc from io.netty.util.internal.logging.InternalLogger.log.

Log an exception (throwable) at the specified level.

Parameters
cause:Throwable

the exception (throwable) to log

Annotations
@Override
logback to summary
public void log(InternalLogLevel level, String msg)

Implements io.netty.util.internal.logging.InternalLogger.log.

Doc from io.netty.util.internal.logging.InternalLogger.log.

Log a message at the specified level.

Parameters
msg:String

the message string to be logged

Annotations
@Override
logback to summary
public void log(InternalLogLevel level, String format, Object arg)

Implements io.netty.util.internal.logging.InternalLogger.log.

Doc from io.netty.util.internal.logging.InternalLogger.log.

Log a message at the specified level according to the specified format and argument.

This form avoids superfluous object creation when the logger is disabled for the specified level.

Parameters
format:String

the format string

arg:Object

the argument

Annotations
@Override
logback to summary
public void log(InternalLogLevel level, String format, Object argA, Object argB)

Implements io.netty.util.internal.logging.InternalLogger.log.

Doc from io.netty.util.internal.logging.InternalLogger.log.

Log a message at the specified level according to the specified format and arguments.

This form avoids superfluous object creation when the logger is disabled for the specified level.

Parameters
format:String

the format string

argA:Object

the first argument

argB:Object

the second argument

Annotations
@Override
logback to summary
public void log(InternalLogLevel level, String format, Object... arguments)

Implements io.netty.util.internal.logging.InternalLogger.log.

Doc from io.netty.util.internal.logging.InternalLogger.log.

Log a message at the specified level 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 an Object[] before invoking the method, even if this logger is disabled for the specified level. The variants taking one and two arguments exist solely in order to avoid this hidden cost.

Parameters
format:String

the format string

arguments:Object[]

a list of 3 or more arguments

Annotations
@Override
nameback to summary
public String name()

Implements io.netty.util.internal.logging.InternalLogger.name.

Doc from io.netty.util.internal.logging.InternalLogger.name.

Return the name of this InternalLogger instance.

Returns:String

name of this logger instance

Annotations
@Override
readResolveback to summary
protected Object readResolve() throws ObjectStreamException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
traceback to summary
public void trace(Throwable t)

Implements io.netty.util.internal.logging.InternalLogger.trace.

Doc from io.netty.util.internal.logging.InternalLogger.trace.

Log an exception (throwable) at the TRACE level.

Parameters
t:Throwable

the exception (throwable) to log

Annotations
@Override
warnback to summary
public void warn(Throwable t)

Implements io.netty.util.internal.logging.InternalLogger.warn.

Doc from io.netty.util.internal.logging.InternalLogger.warn.

Log an exception (throwable) at the WARN level.

Parameters
t:Throwable

the exception (throwable) to log

Annotations
@Override