WebSphere Application Server Network Deployment, Version 6.0.x   Operating Systems: AIX, HP-UX, Linux, Solaris, Windows
             [TIP: Focusing the table of contents and search results]

Adding logging and tracing to your application

You can add logging and tracing to applications to help analyze performance and diagnose problems in WebSphere Application Server.

About this task

Deprecation: The JRas framework that is described in this information center is deprecated. However, you can achieve the same results using Java logging.

Designers and developers of applications that run with or under WebSphere Application Server, such as servlets, JavaServer Pages (JSP) files, enterprise beans, client applications, and their supporting classes, might find it useful to use Java logging for generating their application logging.

This approach has advantages over adding System.out.println statements to your code:
  • Your messages are displayed in the WebSphere Application Server standard log files, using a standard message format with additional data, such as a date and time stamp that are added automatically.
  • You can more easily correlate problems and events in your own application to problems and events that are associated with WebSphere Application Server components.
  • You can take advantage of the WebSphere Application Server log file management features.
  • You can view your messages with the Log Analyzer tool.



Procedure

  1. Enable and configure one of the supported types of logging. Use one of the following methods:
  2. Customize the properties to meet your logging needs. For example, enable or disable a particular log, specify the number of logs to be kept, and specify a format for log output.
  3. Restart the application server after making static configuration changes.



Sub-topics
Configuring Java logging using the administrative console
[Version 6.0.2] Configuring applications to use Jakarta Commons Logging
Programming with the JRas framework
Logging Common Base Events in WebSphere Application Server
Related tasks
Using a logger
Task topic    

Terms of Use | Feedback

Last updated: Mar 8, 2007 8:14:28 PM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/ttrb_addtrace.html

© Copyright IBM Corporation 2004, 2006. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)