public abstract class TraceLog
extends java.lang.Object
See the documentation for the TraceLogFactory class for
details on how trace logging is configured.
TraceLogFactory| Modifier | Constructor and Description |
|---|---|
protected |
TraceLog()
Simple constructor.
|
protected |
TraceLog(java.lang.String traceLogName)
Constructor to create a named log instance.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
entering(java.lang.String className,
java.lang.String methodName)
Log a message that a given method is being entered.
|
abstract void |
entering(java.lang.String className,
java.lang.String methodName,
java.lang.Object parameter)
Log a message that a given method is being entered, and log a single
parameter to the method.
|
abstract void |
entering(java.lang.String className,
java.lang.String methodName,
java.lang.Object[] parameters)
Log a message that a given method is being entered, and log the
parameters to the method.
|
abstract void |
exiting(java.lang.String className,
java.lang.String methodName)
Log a message that a given method is being exited.
|
abstract void |
exiting(java.lang.String className,
java.lang.String methodName,
java.lang.Object result)
Log a message that a given method is being exited, along with the result
that is being returned.
|
TraceLevel |
getTraceLevel()
Returns the the finest verbosity level at which messages will be logged.
|
protected java.lang.String |
getTraceLogName()
Returns the name of the logger, which could be displayed in log messages
to distinguish the source of a log message.
|
boolean |
isBasicTraceEnabled()
Returns whether or not
BASIC tracing is enabled. |
boolean |
isFinerTraceEnabled()
Returns whether or not
FINER tracing is enabled. |
boolean |
isFinestTraceEnabled()
Returns whether or not
FINEST tracing is enabled. |
boolean |
isFineTraceEnabled()
Returns whether or not
FINE tracing is enabled. |
protected void |
setTraceLevel(TraceLevel level)
Set the finest verbosity level at which messages will be logged.
|
protected void |
setTraceLogName(java.lang.String traceLogName)
Sets the name of the logger.
|
abstract void |
trace(java.lang.Object message)
Write the given message to the log at the
BASIC log level. |
abstract void |
trace(java.lang.Object message,
java.lang.Throwable cause)
Write a message with an associated error to the log, at the
BASIC log level. |
abstract void |
trace(java.lang.Object message,
java.lang.Throwable cause,
TraceLevel level)
Write a message with an associated error to the log, at the given log
level.
|
abstract void |
trace(java.lang.Object message,
TraceLevel level)
Write the given message to the log at the given log level.
|
protected TraceLog()
protected TraceLog(java.lang.String traceLogName)
traceLogName - the name of the trace log, which could be displayed in log
messages to help distinguish the source of a message.public boolean isBasicTraceEnabled()
BASIC tracing is enabled.BASIC tracing is enabled.public boolean isFineTraceEnabled()
FINE tracing is enabled.FINE tracing is enabled.public boolean isFinerTraceEnabled()
FINER tracing is enabled.FINER tracing is enabled.public boolean isFinestTraceEnabled()
FINEST tracing is enabled.FINEST tracing is enabled.protected void setTraceLevel(TraceLevel level)
level - the trace verbosity level.public TraceLevel getTraceLevel()
protected void setTraceLogName(java.lang.String traceLogName)
traceLogName - the name of the loggerprotected java.lang.String getTraceLogName()
public abstract void trace(java.lang.Object message)
BASIC log level.message - the message to write to the log.public abstract void trace(java.lang.Object message,
java.lang.Throwable cause)
BASIC log level.message - the message to write to the log.cause - the cause of the message being logged.public abstract void trace(java.lang.Object message,
TraceLevel level)
message - the message to write to the log.level - the trace level at which to log the message.public abstract void trace(java.lang.Object message,
java.lang.Throwable cause,
TraceLevel level)
message - the message to write to the log.cause - the cause of the message being logged.level - the trace level at which to log the message.public abstract void entering(java.lang.String className,
java.lang.String methodName)
The message should be logged at the FINER level.
className - the name of the class whose method is being entered, can be
null if this is not to be loggedmethodName - the name of the method being entered.public abstract void entering(java.lang.String className,
java.lang.String methodName,
java.lang.Object parameter)
The message should be logged at the FINER level.
className - the name of the class whose method is being entered, can be
null if this is not to be loggedmethodName - the name of the method being entered.parameter - the parameter to the method, may be null if there
is no parameters.public abstract void entering(java.lang.String className,
java.lang.String methodName,
java.lang.Object[] parameters)
The message should be logged at the FINER level.
className - the name of the class whose method is being entered, can be
null if this is not to be loggedmethodName - the name of the method being entered.parameters - the parameters to the method, may be null if there
are no parameters.public abstract void exiting(java.lang.String className,
java.lang.String methodName)
The message should be logged at the FINER level.
className - the name of the class whose method is being exited, can be
null if this is not to be loggedmethodName - the name of the method being exited.public abstract void exiting(java.lang.String className,
java.lang.String methodName,
java.lang.Object result)
The message should be logged at the FINER level.
className - the name of the class whose method is being exited, can be
null if this is not to be loggedmethodName - the name of the method being exited.result - the value being returned.