Enabling trace

Trace for an application server process is enabled while the server process runs by using the administrative console. You can configure the application server to start in a trace-enabled state by setting the appropriate configuration properties. You can only enable trace for an application client or stand-alone process at process startup.

Trace strings

By default, the trace service for all WebSphere Application Server components is disabled. To request a change to the current state of the trace service, a trace string is passed to the trace service. This trace string encodes the information detailing which level of trace to enable or disable and for which components.

You can type in Trace strings, or construct them with a user-friendly GUI in the administrative console. Trace strings must conform to a specific grammar for processing by the trace service. The specification of this grammar follows:

TRACESTRING=COMPONENT_TRACE_STRING[:COMPONENT_TRACE_STRING]* 

 COMPONENT_TRACE_STRING=COMPONENT_NAME=LEVEL=STATE[,LEVEL=STATE]* 

LEVEL = all | entryExit | debug | event 

STATE = enabled | disabled 

COMPONENT_NAME = COMPONENT | GROUP

The COMPONENT_NAME is the name of a component or group registered with the trace service. Typically, WebSphere Application Server components register using a fully qualified Java classname, for example com.ibm.servlet.engine.ServletEngine. In addition, you can use a wildcard character of asterisk (*) to terminate a component name and indicate multiple classes or packages. For example, use a component name of com.ibm.servlet.* to specify all components whose names begin with com.ibm.servlet.

Examples of legal trace strings include:

com.ibm.ejs.ras.ManagerAdmin=debug=enabled 
com.ibm.ejs.ras.ManagerAdmin=all=enabled,event=disabled 
com.ibm.ejs.ras.*=all=enabled 
com.ibm.ejs.ras.*=all=enabled:com.ibm.ws.ras=debug=enabled,entryexit=enabled 

Trace strings cannot contain blanks.

Proceed from broad to specific trace specifications in the trace string

Note: Start the trace string from the most broad component groups and then select more specific traces. The advantage to this approach is that the trace settings for classes or packages that are contained in a larger group will be specified correctly by including them later in the trace string.

The logging string is processed from left to right. During the processing, part of the logging string might be modified or removed if the levels they configure are being overridden by another part of the logging string.

Trace strings are processed from left to right. Specifying a trace string like

abc.*=all=enabled,event=disabled
first enables all trace for all components whose names start with abc, then disables event tracing for those same components. This means that the trace string
abc.*=all=enabled,event=disabled
is equivalent to
abc.*=debug=enabled,entryexit=enabled


Related tasks
Enabling trace at server startup
Enabling trace on a running server
Enabling trace on client and standalone applications
Managing the application server trace service



Searchable topic ID:   ctrb_enabletrc
Last updated: Jun 21, 2007 9:56:50 PM CDT    WebSphere Application Server for z/OS, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/ctrb_enabletrc.html

Library | Support | Terms of Use | Feedback