public class SubstituteLogger extends Object implements Logger
NOPLogger. However, a different delegate can be set at any time.
See also the relevant
error code documentation.ROOT_LOGGER_NAME| Constructor and Description |
|---|
SubstituteLogger(String name,
Queue<SubstituteLoggingEvent> eventQueue,
boolean createdPostInitialization) |
| Modifier and Type | Method and Description |
|---|---|
void |
debug(Marker marker,
String msg)
Log a message with the specific Marker at the DEBUG level.
|
void |
debug(Marker marker,
String format,
Object... arguments)
This method is similar to
Logger.debug(String, Object...)
method except that the marker data is also taken into
consideration. |
void |
debug(Marker marker,
String format,
Object arg)
This method is similar to
Logger.debug(String, Object) method except that the
marker data is also taken into consideration. |
void |
debug(Marker marker,
String format,
Object arg1,
Object arg2)
This method is similar to
Logger.debug(String, Object, Object)
method except that the marker data is also taken into
consideration. |
void |
debug(Marker marker,
String msg,
Throwable t)
This method is similar to
Logger.debug(String, Throwable) method except that the
marker data is also taken into consideration. |
void |
debug(String msg)
Log a message at the DEBUG level.
|
void |
debug(String format,
Object... arguments)
Log a message at the DEBUG level according to the specified format
and arguments.
|
void |
debug(String format,
Object arg)
Log a message at the DEBUG level according to the specified format
and argument.
|
void |
debug(String format,
Object arg1,
Object arg2)
Log a message at the DEBUG level according to the specified format
and arguments.
|
void |
debug(String msg,
Throwable t)
Log an exception (throwable) at the DEBUG level with an
accompanying message.
|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
void |
error(Marker marker,
String msg)
Log a message with the specific Marker at the ERROR level.
|
void |
error(Marker marker,
String format,
Object... arguments)
This method is similar to
Logger.error(String, Object...)
method except that the marker data is also taken into
consideration. |
void |
error(Marker marker,
String format,
Object arg)
This method is similar to
Logger.error(String, Object) method except that the
marker data is also taken into consideration. |
void |
error(Marker marker,
String format,
Object arg1,
Object arg2)
This method is similar to
Logger.error(String, Object, Object)
method except that the marker data is also taken into
consideration. |
void |
error(Marker marker,
String msg,
Throwable t)
This method is similar to
Logger.error(String, Throwable)
method except that the marker data is also taken into
consideration. |
void |
error(String msg)
Log a message at the ERROR level.
|
void |
error(String format,
Object... arguments)
Log a message at the ERROR level according to the specified format
and arguments.
|
void |
error(String format,
Object arg)
Log a message at the ERROR level according to the specified format
and argument.
|
void |
error(String format,
Object arg1,
Object arg2)
Log a message at the ERROR level according to the specified format
and arguments.
|
void |
error(String msg,
Throwable t)
Log an exception (throwable) at the ERROR level with an
accompanying message.
|
String |
getName()
Return the name of this
Logger instance. |
int |
hashCode()
Returns a hash code value for the object.
|
void |
info(Marker marker,
String msg)
Log a message with the specific Marker at the INFO level.
|
void |
info(Marker marker,
String format,
Object... arguments)
This method is similar to
Logger.info(String, Object...)
method except that the marker data is also taken into
consideration. |
void |
info(Marker marker,
String format,
Object arg)
This method is similar to
Logger.info(String, Object) method except that the
marker data is also taken into consideration. |
void |
info(Marker marker,
String format,
Object arg1,
Object arg2)
This method is similar to
Logger.info(String, Object, Object)
method except that the marker data is also taken into
consideration. |
void |
info(Marker marker,
String msg,
Throwable t)
This method is similar to
Logger.info(String, Throwable) method
except that the marker data is also taken into consideration. |
void |
info(String msg)
Log a message at the INFO level.
|
void |
info(String format,
Object... arguments)
Log a message at the INFO level according to the specified format
and arguments.
|
void |
info(String format,
Object arg)
Log a message at the INFO level according to the specified format
and argument.
|
void |
info(String format,
Object arg1,
Object arg2)
Log a message at the INFO level according to the specified format
and arguments.
|
void |
info(String msg,
Throwable t)
Log an exception (throwable) at the INFO level with an
accompanying message.
|
boolean |
isDebugEnabled()
Is the logger instance enabled for the DEBUG level?
|
boolean |
isDebugEnabled(Marker marker)
Similar to
Logger.isDebugEnabled() method except that the
marker data is also taken into account. |
boolean |
isDelegateEventAware() |
boolean |
isDelegateNOP() |
boolean |
isDelegateNull() |
boolean |
isErrorEnabled()
Is the logger instance enabled for the ERROR level?
|
boolean |
isErrorEnabled(Marker marker)
Similar to
Logger.isErrorEnabled() method except that the
marker data is also taken into consideration. |
boolean |
isInfoEnabled()
Is the logger instance enabled for the INFO level?
|
boolean |
isInfoEnabled(Marker marker)
Similar to
Logger.isInfoEnabled() method except that the marker
data is also taken into consideration. |
boolean |
isTraceEnabled()
Is the logger instance enabled for the TRACE level?
|
boolean |
isTraceEnabled(Marker marker)
Similar to
Logger.isTraceEnabled() method except that the
marker data is also taken into account. |
boolean |
isWarnEnabled()
Is the logger instance enabled for the WARN level?
|
boolean |
isWarnEnabled(Marker marker)
Similar to
Logger.isWarnEnabled() method except that the marker
data is also taken into consideration. |
void |
log(LoggingEvent event) |
void |
setDelegate(Logger delegate)
Typically called after the
LoggerFactory initialization phase is completed. |
void |
trace(Marker marker,
String msg)
Log a message with the specific Marker at the TRACE level.
|
void |
trace(Marker marker,
String format,
Object... arguments)
This method is similar to
Logger.trace(String, Object...)
method except that the marker data is also taken into
consideration. |
void |
trace(Marker marker,
String format,
Object arg)
This method is similar to
Logger.trace(String, Object) method except that the
marker data is also taken into consideration. |
void |
trace(Marker marker,
String format,
Object arg1,
Object arg2)
This method is similar to
Logger.trace(String, Object, Object)
method except that the marker data is also taken into
consideration. |
void |
trace(Marker marker,
String msg,
Throwable t)
This method is similar to
Logger.trace(String, Throwable) method except that the
marker data is also taken into consideration. |
void |
trace(String msg)
Log a message at the TRACE level.
|
void |
trace(String format,
Object... arguments)
Log a message at the TRACE level according to the specified format
and arguments.
|
void |
trace(String format,
Object arg)
Log a message at the TRACE level according to the specified format
and argument.
|
void |
trace(String format,
Object arg1,
Object arg2)
Log a message at the TRACE level according to the specified format
and arguments.
|
void |
trace(String msg,
Throwable t)
Log an exception (throwable) at the TRACE level with an
accompanying message.
|
void |
warn(Marker marker,
String msg)
Log a message with the specific Marker at the WARN level.
|
void |
warn(Marker marker,
String format,
Object... arguments)
This method is similar to
Logger.warn(String, Object...)
method except that the marker data is also taken into
consideration. |
void |
warn(Marker marker,
String format,
Object arg)
This method is similar to
Logger.warn(String, Object) method except that the
marker data is also taken into consideration. |
void |
warn(Marker marker,
String format,
Object arg1,
Object arg2)
This method is similar to
Logger.warn(String, Object, Object)
method except that the marker data is also taken into
consideration. |
void |
warn(Marker marker,
String msg,
Throwable t)
This method is similar to
Logger.warn(String, Throwable) method
except that the marker data is also taken into consideration. |
void |
warn(String msg)
Log a message at the WARN level.
|
void |
warn(String format,
Object... arguments)
Log a message at the WARN level according to the specified format
and arguments.
|
void |
warn(String format,
Object arg)
Log a message at the WARN level according to the specified format
and argument.
|
void |
warn(String format,
Object arg1,
Object arg2)
Log a message at the WARN level according to the specified format
and arguments.
|
void |
warn(String msg,
Throwable t)
Log an exception (throwable) at the WARN level with an
accompanying message.
|
public SubstituteLogger(String name, Queue<SubstituteLoggingEvent> eventQueue, boolean createdPostInitialization)
public void debug(Marker marker, String msg)
Loggerpublic void debug(Marker marker, String format, Object... arguments)
LoggerLogger.debug(String, Object...)
method except that the marker data is also taken into
consideration.public void debug(Marker marker, String format, Object arg)
LoggerLogger.debug(String, Object) method except that the
marker data is also taken into consideration.public void debug(Marker marker, String format, Object arg1, Object arg2)
LoggerLogger.debug(String, Object, Object)
method except that the marker data is also taken into
consideration.public void debug(Marker marker, String msg, Throwable t)
LoggerLogger.debug(String, Throwable) method except that the
marker data is also taken into consideration.public void debug(String msg)
Loggerpublic void debug(String format, Object... arguments)
LoggerThis form avoids superfluous string concatenation when the logger
is disabled for the DEBUG 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 DEBUG. The variants taking
one and two
arguments exist solely in order to avoid this hidden cost.
public void debug(String format, Object arg)
LoggerThis form avoids superfluous object creation when the logger is disabled for the DEBUG level.
public void debug(String format, Object arg1, Object arg2)
LoggerThis form avoids superfluous object creation when the logger is disabled for the DEBUG level.
public void debug(String msg, Throwable t)
Loggerpublic boolean equals(Object o)
Object
The equals method implements an equivalence relation on non-null object references:
x, x.equals(x)
should return true.
x and y,
x.equals(y) should return true if and only if y.equals(x) returns
true.
x, y, and
z, if x.equals(y) returns true and y.equals(z) returns
true, then x.equals(z) should return true.
x and y, multiple
invocations of x.equals(y) consistently return true or consistently return
false, provided no information used in equals comparisons on the objects is
modified.
x, x.equals(null) should return
false.
The equals method for class Object implements the most discriminating possible
equivalence relation on objects; that is, for any non-null reference values x and
y, this method returns true if and only if x and y refer to the
same object (x == y has the value true).
Note that it is generally necessary to override the hashCode method whenever this method
is overridden, so as to maintain the general contract for the hashCode method, which
states that equal objects must have equal hash codes.
equals in class Objecto - the reference object with which to compare.true if this object is the same as the obj argument; false otherwise.Object.hashCode(),
HashMappublic void error(Marker marker, String msg)
Loggerpublic void error(Marker marker, String format, Object... arguments)
LoggerLogger.error(String, Object...)
method except that the marker data is also taken into
consideration.public void error(Marker marker, String format, Object arg)
LoggerLogger.error(String, Object) method except that the
marker data is also taken into consideration.public void error(Marker marker, String format, Object arg1, Object arg2)
LoggerLogger.error(String, Object, Object)
method except that the marker data is also taken into
consideration.public void error(Marker marker, String msg, Throwable t)
LoggerLogger.error(String, Throwable)
method except that the marker data is also taken into
consideration.public void error(String msg)
Loggerpublic void error(String format, Object... arguments)
LoggerThis form avoids superfluous string concatenation when the logger
is disabled for the ERROR 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 ERROR. The variants taking
one and two
arguments exist solely in order to avoid this hidden cost.
public void error(String format, Object arg)
LoggerThis form avoids superfluous object creation when the logger is disabled for the ERROR level.
public void error(String format, Object arg1, Object arg2)
LoggerThis form avoids superfluous object creation when the logger is disabled for the ERROR level.
public void error(String msg, Throwable t)
Loggerpublic String getName()
LoggerLogger instance.public int hashCode()
ObjectHashMap.
The general contract of hashCode is:
hashCode method must consistently return the same integer, provided no
information used in equals comparisons on the object is modified. This integer need not
remain consistent from one execution of an application to another execution of the same
application.
equals(Object) method, then calling the
hashCode method on each of the two objects must produce the same integer result.
Object.equals(java.lang.Object) method, then calling the hashCode
method on each of the two objects must produce distinct integer results. However, the programmer
should be aware that producing distinct integer results for unequal objects may improve the
performance of hash tables.
As much as is reasonably practical, the hashCode method defined by class Object does
return distinct integers for distinct objects. (This is typically implemented by converting the
internal address of the object into an integer, but this implementation technique is not required
by the JavaTM programming language.)
hashCode in class ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)public void info(Marker marker, String msg)
Loggerpublic void info(Marker marker, String format, Object... arguments)
LoggerLogger.info(String, Object...)
method except that the marker data is also taken into
consideration.public void info(Marker marker, String format, Object arg)
LoggerLogger.info(String, Object) method except that the
marker data is also taken into consideration.public void info(Marker marker, String format, Object arg1, Object arg2)
LoggerLogger.info(String, Object, Object)
method except that the marker data is also taken into
consideration.public void info(Marker marker, String msg, Throwable t)
LoggerLogger.info(String, Throwable) method
except that the marker data is also taken into consideration.public void info(String msg)
Loggerpublic void info(String format, Object... arguments)
LoggerThis form avoids superfluous string concatenation when the logger
is disabled for the INFO 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 INFO. The variants taking
one and two
arguments exist solely in order to avoid this hidden cost.
public void info(String format, Object arg)
LoggerThis form avoids superfluous object creation when the logger is disabled for the INFO level.
public void info(String format, Object arg1, Object arg2)
LoggerThis form avoids superfluous object creation when the logger is disabled for the INFO level.
public void info(String msg, Throwable t)
Loggerpublic boolean isDebugEnabled()
LoggerisDebugEnabled in interface Loggerpublic boolean isDebugEnabled(Marker marker)
LoggerLogger.isDebugEnabled() method except that the
marker data is also taken into account.isDebugEnabled in interface Loggermarker - The marker data to take into considerationpublic boolean isDelegateEventAware()
public boolean isDelegateNOP()
public boolean isDelegateNull()
public boolean isErrorEnabled()
LoggerisErrorEnabled in interface Loggerpublic boolean isErrorEnabled(Marker marker)
LoggerLogger.isErrorEnabled() method except that the
marker data is also taken into consideration.isErrorEnabled in interface Loggermarker - The marker data to take into considerationpublic boolean isInfoEnabled()
LoggerisInfoEnabled in interface Loggerpublic boolean isInfoEnabled(Marker marker)
LoggerLogger.isInfoEnabled() method except that the marker
data is also taken into consideration.isInfoEnabled in interface Loggermarker - The marker data to take into considerationpublic boolean isTraceEnabled()
LoggerisTraceEnabled in interface Loggerpublic boolean isTraceEnabled(Marker marker)
LoggerLogger.isTraceEnabled() method except that the
marker data is also taken into account.isTraceEnabled in interface Loggermarker - The marker data to take into considerationpublic boolean isWarnEnabled()
LoggerisWarnEnabled in interface Loggerpublic boolean isWarnEnabled(Marker marker)
LoggerLogger.isWarnEnabled() method except that the marker
data is also taken into consideration.isWarnEnabled in interface Loggermarker - The marker data to take into considerationpublic void log(LoggingEvent event)
public void setDelegate(Logger delegate)
LoggerFactory initialization phase is completed.delegate - public void trace(Marker marker, String msg)
Loggerpublic void trace(Marker marker, String format, Object... arguments)
LoggerLogger.trace(String, Object...)
method except that the marker data is also taken into
consideration.public void trace(Marker marker, String format, Object arg)
LoggerLogger.trace(String, Object) method except that the
marker data is also taken into consideration.public void trace(Marker marker, String format, Object arg1, Object arg2)
LoggerLogger.trace(String, Object, Object)
method except that the marker data is also taken into
consideration.public void trace(Marker marker, String msg, Throwable t)
LoggerLogger.trace(String, Throwable) method except that the
marker data is also taken into consideration.public void trace(String msg)
Loggerpublic void trace(String format, Object... arguments)
LoggerThis form avoids superfluous string concatenation when the logger
is disabled for the TRACE 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 TRACE. The variants taking one and
two arguments exist solely in order to avoid this hidden cost.
public void trace(String format, Object arg)
LoggerThis form avoids superfluous object creation when the logger is disabled for the TRACE level.
public void trace(String format, Object arg1, Object arg2)
LoggerThis form avoids superfluous object creation when the logger is disabled for the TRACE level.
public void trace(String msg, Throwable t)
Loggerpublic void warn(Marker marker, String msg)
Loggerpublic void warn(Marker marker, String format, Object... arguments)
LoggerLogger.warn(String, Object...)
method except that the marker data is also taken into
consideration.public void warn(Marker marker, String format, Object arg)
LoggerLogger.warn(String, Object) method except that the
marker data is also taken into consideration.public void warn(Marker marker, String format, Object arg1, Object arg2)
LoggerLogger.warn(String, Object, Object)
method except that the marker data is also taken into
consideration.public void warn(Marker marker, String msg, Throwable t)
LoggerLogger.warn(String, Throwable) method
except that the marker data is also taken into consideration.public void warn(String msg)
Loggerpublic void warn(String format, Object... arguments)
LoggerThis form avoids superfluous string concatenation when the logger
is disabled for the WARN 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 WARN. The variants taking
one and two
arguments exist solely in order to avoid this hidden cost.
public void warn(String format, Object arg)
LoggerThis form avoids superfluous object creation when the logger is disabled for the WARN level.
public void warn(String format, Object arg1, Object arg2)
LoggerThis form avoids superfluous object creation when the logger is disabled for the WARN level.