Search WebSpherePower's 6,973 WebSphere, Java, and Eclipse article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Utilizing the IBM Trace Log in WebSphere Application Server (continued)

Programming considerations using IBM's Trace Logging facilities
Since IBM's TrLog is the default implementation of commons logging, you do not need to do anything special to implement trace logging. The simplest method to obtain an instance of com.ibm.ws.commons.logging.TrLog is to use the standard factory method:

Log myLog = LogFactory.getLog("<your-log-name>");

Once you have an instance of com.ibm.ws.commons.logging.TrLog, you can use all of the standard logging methods to generate log messages such as:

myLog.debug("<your-debug-level-message-text>");

In addition to the standard methods, you can also use the log.trace() method to generate trace-level messages for enhanced problem determination. Trace-level messages can be included in your application to provide a finer-grained level of information than that normally provided by debug- or info-level messages.

Administering Trace Logging output
The output of IBM's TrLog facility can be controlled through the WebSphere Administrative Console. To access the console, open up a browser window and enter in the address (URL) of your server's console application. Log into the console and click on the plus sign in front of the "Troubleshooting" menu item, as shown in Figure A.

FIGURE A


Expand the Troubleshooting menu Roll over picture for a larger image.

This will open up three selections, Logs and Trace, Configuration Problems, and PMI Request Metrics. Click on Logs and Trace. This should take you to the server selection panel, Figure B.

FIGURE B


Select your server. Roll over picture for a larger image.

Click on the name of your server. This will take you to the logging and tracing options panel, Figure C.

FIGURE C


You're almost there. Roll over picture for a larger image.

Click on Diagnostic Trace. This will take you to the diagnostic trace configuration panel, Figure D.

FIGURE D


This is where you'll manage your trace output. Roll over picture for a larger image.

The Diagnostic Trace configuration panel is where you manage the trace output. To adjust the trace output, you can either type in your new values in the Trace Specification text box, or you can click on the Modify button to bring up a wizard that will walk you through your changes, as you can see in Figure E.

FIGURE E


This wizard will walk you through your changes. Roll over picture for a larger image.

The wizard displays all known WebSphere facilities that utilize trace logging, and in version 5.0, your implementation will appear under the category UNKNOWN (once you have logged at least one message).

You can also change the name of the trace log file in the Trace Output section of the panel. Once you have made your changes, click OK and follow the instructions to save the master configuration.

You can also use the administrative console to view the trace log. Click on the Runtime tab on the configuration panel to access this option, as shown in Figure F.

FIGURE F


Pop into the Runtime tab to make your change. Roll over picture for a larger image.

In the Trace Output section of the panel, click the View button. This will take you to the trace log view screen that's displayed in Figure G.


« Previous  ·  1  ·  2  ·  3  ·  Next »
Other articles you might like
Home > Server Integration (5 articles)
   WebSphere Application Server 6: what's it all mean?
   More on WebSphere and Apache
   Enabling admin when running a portal server from WSAD
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent WebSpherePower Articles
A perfect 10: celebrating 10 years online
You can help bring security and safety back to White House email
Introducing the WebSpherePower RSS feeds
From New Jersey to Palm Bay, Florida
A WebSphere pot o' gold
How Elvis entered the building and CES went out the window
WebSphere Application Server 6: what's it all mean?
WebSpherePower News
Legal question: Can HP keep Hurd from going to Oracle?
Caringo announces integration with Symantec EV 9.0
Cisco & Citrix marry on virty PCs
Take Heed, Tech Giants: Edison's Failed Plot To Hijack Hollywood
IBM code unchains virtual workloads
Oracle names H-P ex-CEO Mark Hurd as co-president
Cloud Messaging Provider, Linxter, Releases SDK for Java and Android
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Introducing the Jones family and their full-family backup challenges
David Gewirtz Online: CNN commentary and analysis
DominoPower: Lotus must open source Notes and Domino
OutlookPower: Hands on debugging a broken Outlook forwarding rule
-- Advertisement --

Influencer. Recommender. Decision Maker.
They all read WebSpherePower Magazine. They all rely on WebSpherePower Magazine.

If you want to reach the inner-circle of IBM IT professionals, you won't find a better resource than WebSpherePower Magazine.

Click for our Media Kit

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login