|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pajes.util.Trace
The PAJES tracing facility.
Tracing can be turned on:
TraceServlet from a browser. <context-param> with a
<param-name> of org.pajes.util.Trace,
and a <param-value> containing the severity levels to be
traced, separated by spaces. For example:
<context-param>
<param-name>org.pajes.util.Trace</param-name>
<param-value>ERROR WARN! ACCESS STATS</param-value>
</context-param>
The valid severity levels are:
| Field Summary | |
static int |
ACCESS
Security messages [2] |
static int |
DEBUG
Debug messages [6] |
static int |
ERROR
Error messages [0] |
static int |
IGNORED
Ignored Exceptions [5] |
static int |
INFORMATION
Information messages [4] |
static int |
PAJES
PAJES trace messages [7] |
static int |
PAJES_DB
PAJES Database objects trace messages [9] |
static int |
PAJES_PARSER
PAJES parsing trace messages [8] |
static int |
STATISTICS
Performance statitics messages [3] |
static int |
WARNING
Warning messages [1] |
| Method Summary | |
static boolean |
getIncludePajesSource()
Returns whether the PAJES classes will be reported in the source stack trace. |
static boolean |
getIncludeThreadName()
Returns whether the Thread name will be reported. |
static boolean |
getShowHeapSize()
Returns whether the heap size will be reported. |
static int |
getSourceDepth()
Returns the depth to which the source of the trace message will be reported. |
static java.lang.String |
getStacktrace(java.lang.Throwable throwable)
Returns a stack trace as a String. |
static void |
getStacktrace(java.lang.Throwable throwable,
java.io.PrintWriter writer)
Writes the throwable stack trace to the specified Writer. |
static boolean |
getSuppressLineFeeds()
Determines whether or not line feeds are suppressed in messages. |
static boolean |
isOn(int severity)
Determines if logging is turned on for the specified severity level. |
static void |
log(int severity,
java.lang.Object o0)
Logs a trace message consisting of the specifed object. |
static void |
log(int severity,
java.lang.Object o0,
java.lang.Object o1)
Logs a trace message consisting of the concatenated parameter objects. |
static void |
log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2)
Logs a trace message consisting of the concatenated parameter objects. |
static void |
log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3)
Logs a trace message consisting of the concatenated parameter objects. |
static void |
log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4)
Logs a trace message consisting of the concatenated parameter objects. |
static void |
log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4,
java.lang.Object o5)
Logs a trace message consisting of the concatenated parameter objects. |
static void |
log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4,
java.lang.Object o5,
java.lang.Object o6)
Logs a trace message consisting of the concatenated parameter objects. |
static void |
log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4,
java.lang.Object o5,
java.lang.Object o6,
java.lang.Object o7)
Logs a trace message consisting of the concatenated parameter objects. |
static void |
log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4,
java.lang.Object o5,
java.lang.Object o6,
java.lang.Object o7,
java.lang.Object o8)
Logs a trace message consisting of the concatenated parameter objects. |
static void |
log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4,
java.lang.Object o5,
java.lang.Object o6,
java.lang.Object o7,
java.lang.Object o8,
java.lang.Object o9)
Logs a trace message consisting of the concatenated parameter objects. |
static void |
setFlag(int severity,
boolean on)
Turns logging on or off for the specified severity level. |
static void |
setFlags(int severity,
boolean on)
Turns logging on or off for the specified severity level, and all levels BELOW it. |
static void |
setIncludePajesSource(boolean on)
Determines whether the PAJES classes will be reported in the source stack trace. |
static void |
setIncludeThreadName(boolean on)
Sets whether the Thread name will be reported. |
static void |
setServletContext(javax.servlet.ServletContext logContext)
Sets the servlet context to which messages will be logged. |
static void |
setShowHeapSize(boolean on)
Sets whether the heap size will be reported. |
static void |
setSourceDepth(int depth)
Sets the depth to which the source of the trace message will be reported. |
static void |
setSuppressLineFeeds(boolean b)
Sets whether or not line feeds are suppressed in messages. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ERROR
public static final int WARNING
public static final int ACCESS
public static final int STATISTICS
public static final int INFORMATION
public static final int IGNORED
public static final int DEBUG
public static final int PAJES
public static final int PAJES_PARSER
public static final int PAJES_DB
| Method Detail |
public static void setFlag(int severity,
boolean on)
set.
severity - one of the defined severity contants.on - true if logging is to be turned on for the specified severity
level, or false if it is to be turned off.
public static void setFlags(int severity,
boolean on)
set.
severity - one of the defined severity contants.on - true if logging is to be turned on for the specified severity
levels, or false if it is to be turned off.public static void setIncludePajesSource(boolean on)
The context default can be changed by creating a
<context-param> with a
<param-name> of
org.pajes.util.Trace.setIncludePajesSource, and a
<param-value> of true. For example:
<context-param>
<param-name>org.pajes.util.Trace.setIncludePajesSource</param-name>
<param-value>true</param-value>
</context-param>
on - true if the PAJES classes are to be reported in the source
stack trace.public static boolean getIncludePajesSource()
public static void setIncludeThreadName(boolean on)
false.
The context default can be changed by creating a
<context-param> with a
<param-name> of
org.pajes.util.Trace.setIncludeThreadName, and a
<param-value> of true. For example:
<context-param>
<param-name>org.pajes.util.Trace.setIncludeThreadName</param-name>
<param-value>true</param-value>
</context-param>
on - true to include the Thread name in the message.public static boolean getIncludeThreadName()
true if the message will include the Thread name.public static boolean isOn(int severity)
severity - one of the defined severity contants.
public static void setServletContext(javax.servlet.ServletContext logContext)
logContext - the ServletContext to which messages are to be logged. Set to
null to disable logging.public static void setShowHeapSize(boolean on)
false.
The context default can be changed by creating a
<context-param> with a
<param-name> of
org.pajes.util.Trace.setShowHeapSize, and a
<param-value> of true. For example:
<context-param>
<param-name>org.pajes.util.Trace.setShowHeapSize</param-name>
<param-value>true</param-value>
</context-param>
on - true to include the heap size in the message.public static boolean getShowHeapSize()
true if the message will include the heap size.public static void setSourceDepth(int depth)
1. Use 0 to report the full
stack trace.
The context default can be changed by creating a
<context-param> with a
<param-name> of
org.pajes.util.Trace.setSourceDepth, and a
<param-value> of the required depth. For example:
<context-param>
<param-name>org.pajes.util.Trace.setSourceDepth</param-name>
<param-value>0</param-value>
</context-param>
depth - the depth of the stack trace.public static int getSourceDepth()
public static java.lang.String getStacktrace(java.lang.Throwable throwable)
throwable - the Throwable instance for which the stack trace is required.
public static void getStacktrace(java.lang.Throwable throwable,
java.io.PrintWriter writer)
throwable - the Throwable instance for which the stack trace is required.writer - the Writer to which the stack trace will be written.public static void setSuppressLineFeeds(boolean b)
b - true if line feeds are suppresed.public static boolean getSuppressLineFeeds()
public static void log(int severity,
java.lang.Object o0)
severity - one of the defined severity contants to indicate the severity
level at which this message should be logged.o0 - an Object to be logged
public static void log(int severity,
java.lang.Object o0,
java.lang.Object o1)
severity - one of the defined severity contants to indicate the severity
level at which this message should be logged.o0 - an Object to be loggedo1 - an Object to be logged
public static void log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2)
severity - one of the defined severity contants to indicate the severity
level at which this message should be logged.o0 - an Object to be loggedo1 - an Object to be loggedo2 - an Object to be logged
public static void log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3)
severity - one of the defined severity contants to indicate the severity
level at which this message should be logged.o0 - an Object to be loggedo1 - an Object to be loggedo2 - an Object to be loggedo3 - an Object to be logged
public static void log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4)
severity - one of the defined severity contants to indicate the severity
level at which this message should be logged.o0 - an Object to be loggedo1 - an Object to be loggedo2 - an Object to be loggedo3 - an Object to be loggedo4 - an Object to be logged
public static void log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4,
java.lang.Object o5)
severity - one of the defined severity contants to indicate the severity
level at which this message should be logged.o0 - an Object to be loggedo1 - an Object to be loggedo2 - an Object to be loggedo3 - an Object to be loggedo4 - an Object to be loggedo5 - an Object to be logged
public static void log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4,
java.lang.Object o5,
java.lang.Object o6)
severity - one of the defined severity contants to indicate the severity
level at which this message should be logged.o0 - an Object to be loggedo1 - an Object to be loggedo2 - an Object to be loggedo3 - an Object to be loggedo4 - an Object to be loggedo5 - an Object to be loggedo6 - an Object to be logged
public static void log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4,
java.lang.Object o5,
java.lang.Object o6,
java.lang.Object o7)
severity - one of the defined severity contants to indicate the severity
level at which this message should be logged.o0 - an Object to be loggedo1 - an Object to be loggedo2 - an Object to be loggedo3 - an Object to be loggedo4 - an Object to be loggedo5 - an Object to be loggedo6 - an Object to be loggedo7 - an Object to be logged
public static void log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4,
java.lang.Object o5,
java.lang.Object o6,
java.lang.Object o7,
java.lang.Object o8)
severity - one of the defined severity contants to indicate the severity
level at which this message should be logged.o0 - an Object to be loggedo1 - an Object to be loggedo2 - an Object to be loggedo3 - an Object to be loggedo4 - an Object to be loggedo5 - an Object to be loggedo6 - an Object to be loggedo7 - an Object to be loggedo8 - an Object to be logged
public static void log(int severity,
java.lang.Object o0,
java.lang.Object o1,
java.lang.Object o2,
java.lang.Object o3,
java.lang.Object o4,
java.lang.Object o5,
java.lang.Object o6,
java.lang.Object o7,
java.lang.Object o8,
java.lang.Object o9)
severity - one of the defined severity contants to indicate the severity
level at which this message should be logged.o0 - an Object to be loggedo1 - an Object to be loggedo2 - an Object to be loggedo3 - an Object to be loggedo4 - an Object to be loggedo5 - an Object to be loggedo6 - an Object to be loggedo7 - an Object to be loggedo8 - an Object to be loggedo9 - an Object to be logged
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||