Search WebSpherePower's 6,976 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.
WEBSPHERE APPLICATION SERVER
Utilizing the IBM Trace Log in WebSphere Application Server
By Jeff Chilton

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint Exupery (French Poet, 1900-1940)

If you've done any work at all in server-side Java applications development, you've had some exposure to Jakarta Commons Logging, and one or more of the products that it supports such as Log4j or Java's own native logging facilities that were introduced with version 1.4.

If you have ever tried to use these services in the WebSphere Application Server environment, you have probably already discovered that the default logging implementation does return an instance of Log4j or any other commonly used logging facility.

In a WebSphere Application Server, the standard LogFactory.getFactory()method returns an instance of com.ibm.ws.commons.logging.TrLogFactory and the standard LogFactory.getLog() method returns an instance of com.ibm.ws.commons.logging.TrLog. If you want to use Log4j, you need to do a little extra work.

Overriding IBM Trace Logging
If you want to override the default log implementations in WebSphere, IBM provides an excellent document explaining the various steps necessary to accomplish this. Integrating Jakarta Commons Logging with IBM WebSphere Application Server V5 can be found on IBM's web site at http://www-1.ibm.com/support/docview.wss?uid=swg27004610.

It lays out the various methods that can be employed to implement alternative logging mechanisms, and also reviews those methods that are not recommended. However, before you go to all of the trouble involved in overriding IBM's own logging implementation, you might first consider the value of simply using the default services that they have provided.

Features of IBM's Trace Logging facilities
Most log implementations provide five standard levels of log messages: DEBUG, INFO, WARN, ERROR, and FATAL. IBM's TrLog supports all five of these standard levels, plus adds an additional level called TRACE. Trace-level messages are one notch below debug-level messages; if you set your logging level to DEBUG, the trace-level messages will not appear in your log. The trace-level messages simply provide one more level of logging for sophisticated problem resolution.

Control of the trace-level messages through TrLog is provided through the WebSphere Administrative Console. Unlike Log4j and other log implementations that use a configuration/properties file to set logging configuration parameters, TrLog responds to manipulations directly from the console. Console operators can modify the logging levels for various logs using the facilities built into the administrative console.


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
NoSQL CouchDB founder turns to phone and cloud services
Will Hurd Make Sun's Woes Worse?
DHS Cybersecurity Watchdogs Miss Hundreds of Vulnerabilities
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
>> 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 --

EASY DEDICATED AND VIRTUAL DEDICATED SERVERS FOR AS LOW AS $67.99 PER MONTH
Customize and configure your own dedicated server. Simply choose one of our popular plans or select your own Linux or Windows server and plan options.

NO LONG WAITS. Server provisioned within hours.

Tap here now and be up and running with your own server tonight.

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