Pages

Thursday, December 16, 2010

Enabling Log and Trace for IBM Websphere Commerce Debugging

WCS logs can be configured using Websphere Application Servers’ Administration Console.

  1. Login to the WAS admin console. Generally, the link for the admin console is

  1. Select  Troubleshooting > Logs and Trace option from the left menu items in the admin console and then click Logs and Trace and select <<server1>> from the screen.
  1. The above step will display general properties for logging and tracing for WAS.
Diagnostic Trace
JVM Logs
Process Logs
IBM Service Logs
Change Log Detail Levels

  1. Select Diagnostic Trace for enabling / disabling log levels and setting the trace output formats (Simple, Advanced or Log Analyzer)
  1. Selecting Change Log Detail Levels  from step 4 above will display all the Components  of Websphere commerce. Trace level can be enabled for a specific  components or for a whole set of components. Various trace levels available are
Off
Fatal
Severe
Warning
Audit
Info
Config
Detail
Fine
All
  1. For example, to enable trace logs for specific components related to webservices, you might want to enable the logs for the following components
com.ibm.commerce.wc.messaging.adapters.jcahttp.JCAHTTPManagedConnectionImpl
com.ibm.commerce.wc.messaging.adapters.jcahttp.ws.JCAHTTPWSManagedConnectionFactoryImpl
com.ibm.websphere.commerce.WC_SERVER
com.ibm.websphere.commerce.adapters.jcahttp
com.ibm.ws.webservices.*
com.ibm.websphere.commerce.WC_MESSAGING
com.ibm.websphere.commerce.WC_TRANSPORT_ADAPTER
com.ibm.websphere.commerce.WC_SENSITIVE_INFO

Once the log levels are changed as per requirement, bounce the application server by issuing stopServer <<server1>>  from the <<AppServerHome>>/bin directory. Before starting the server, ensure that logs folder is cleared so that fresh logs are created.

The above details are valid for IBM Websphere Commerce 6.0 Fix Pack 9, Feature pack 1,2, 4 and 5 and WAS version 6.0.2.27

3 comments:

  1. Hi,

    I enabled tracing. But Server taking too much of time to start as i enabled all. Now i want disable it. How to disable???.

    ReplyDelete
  2. Issue either one of the following commands:

    disableConsoleTrace.bat

    wsadmin -connType NONE -c "$AdminControl setAttribute [$AdminControl completeObjectName type=TraceService,process=server1,*] traceSpecification ConsoleTrace=event=disabled:ConsoleTrace=debug=disabled"

    Refer to the infocenter for more details

    http://publib.boulder.ibm.com/infocenter/svc/ic/index.jsp?topic=/com.ibm.storage.svc431.console.doc/svc_webspherappservlog_21vzdv.html

    ReplyDelete
    Replies
    1. In my case, I don't have the disableConsoleTrace.bat. So I go to the server.xml and change it with a text editor. In the startupTraceSpecification="*=finnest" change it to startupTraceSpecification="*=info" and finally the server starts.

      Delete